tests: update integration tests to use setLockTime

This commit is contained in:
Daniel Cousens 2016-01-28 00:56:58 +11:00
parent 8a37c1193a
commit 9a62ab600f

View file

@ -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)
@ -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)