tests: update integration tests to use setLockTime
This commit is contained in:
parent
8a37c1193a
commit
9a62ab600f
1 changed files with 2 additions and 6 deletions
|
@ -95,13 +95,11 @@ describe('bitcoinjs-lib (advanced)', function () {
|
||||||
this.timeout(30000)
|
this.timeout(30000)
|
||||||
|
|
||||||
var tx2 = new bitcoin.TransactionBuilder(network)
|
var tx2 = new bitcoin.TransactionBuilder(network)
|
||||||
// tx2.setLockTime(threeHoursAgo) // TODO
|
tx2.setLockTime(threeHoursAgo)
|
||||||
tx2.addInput(txId, 0, 0xfffffffe)
|
tx2.addInput(txId, 0, 0xfffffffe)
|
||||||
tx2.addOutput(alice.getAddress(), 1000)
|
tx2.addOutput(alice.getAddress(), 1000)
|
||||||
|
|
||||||
var tx2Raw = tx2.buildIncomplete()
|
var tx2Raw = tx2.buildIncomplete()
|
||||||
tx2Raw.locktime = threeHoursAgo // TODO
|
|
||||||
|
|
||||||
var hashType = bitcoin.Transaction.SIGHASH_ALL
|
var hashType = bitcoin.Transaction.SIGHASH_ALL
|
||||||
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
|
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
|
||||||
var signature = alice.sign(signatureHash)
|
var signature = alice.sign(signatureHash)
|
||||||
|
@ -120,13 +118,11 @@ describe('bitcoinjs-lib (advanced)', function () {
|
||||||
this.timeout(30000)
|
this.timeout(30000)
|
||||||
|
|
||||||
var tx2 = new bitcoin.TransactionBuilder(network)
|
var tx2 = new bitcoin.TransactionBuilder(network)
|
||||||
// tx2.setLockTime(threeHoursAgo) // TODO
|
tx2.setLockTime(threeHoursAgo)
|
||||||
tx2.addInput(txId, 0, 0xfffffffe)
|
tx2.addInput(txId, 0, 0xfffffffe)
|
||||||
tx2.addOutput(alice.getAddress(), 1000)
|
tx2.addOutput(alice.getAddress(), 1000)
|
||||||
|
|
||||||
var tx2Raw = tx2.buildIncomplete()
|
var tx2Raw = tx2.buildIncomplete()
|
||||||
tx2Raw.locktime = threeHoursAgo // TODO
|
|
||||||
|
|
||||||
var hashType = bitcoin.Transaction.SIGHASH_ALL
|
var hashType = bitcoin.Transaction.SIGHASH_ALL
|
||||||
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
|
var signatureHash = tx2Raw.hashForSignature(0, redeemScript, hashType)
|
||||||
var signatureA = alice.sign(signatureHash)
|
var signatureA = alice.sign(signatureHash)
|
||||||
|
|
Loading…
Add table
Reference in a new issue