Skip to content

Commit

Permalink
tests: update integration tests to use setLockTime
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Jan 27, 2016
1 parent 8a37c11 commit 9a62ab6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/integration/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,11 @@ describe('bitcoinjs-lib (advanced)', function () {
this.timeout(30000)

var tx2 = new bitcoin.TransactionBuilder(network)
// tx2.setLockTime(threeHoursAgo) // TODO
tx2.setLockTime(threeHoursAgo)
tx2.addInput(txId, 0, 0xfffffffe)
tx2.addOutput(alice.getAddress(), 1000)

var tx2Raw = tx2.buildIncomplete()
tx2Raw.locktime = threeHoursAgo // TODO

var hashType = bitcoin.Transaction.SIGHASH_ALL
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
var signature = alice.sign(signatureHash)
Expand All @@ -120,13 +118,11 @@ describe('bitcoinjs-lib (advanced)', function () {
this.timeout(30000)

var tx2 = new bitcoin.TransactionBuilder(network)
// tx2.setLockTime(threeHoursAgo) // TODO
tx2.setLockTime(threeHoursAgo)
tx2.addInput(txId, 0, 0xfffffffe)
tx2.addOutput(alice.getAddress(), 1000)

var tx2Raw = tx2.buildIncomplete()
tx2Raw.locktime = threeHoursAgo // TODO

var hashType = bitcoin.Transaction.SIGHASH_ALL
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
var signatureA = alice.sign(signatureHash)
Expand Down

0 comments on commit 9a62ab6

Please sign in to comment.