Add test vectors, and transaction_builder input stores signScript

This commit is contained in:
Thomas Kerin 2017-01-20 21:07:19 +01:00 committed by Daniel Cousens
parent e4db4a07b0
commit c2dfc03869
5 changed files with 976 additions and 23 deletions

View file

@ -66,7 +66,6 @@ function construct (f, dontSign) {
if (sign.witnessScript) {
witnessScript = bscript.fromASM(sign.witnessScript)
}
txb.sign(index, keyPair, redeemScript, sign.hashType, value, witnessScript)
})
})
@ -384,7 +383,6 @@ describe('TransactionBuilder', function () {
tx.ins[i].script = replacement
}
// now import it
txb = TransactionBuilder.fromTransaction(tx, network)
}
@ -394,7 +392,6 @@ describe('TransactionBuilder', function () {
// update the tx
tx = txb.buildIncomplete()
// now verify the serialized scriptSig is as expected
assert.strictEqual(bscript.toASM(tx.ins[i].script), sign.scriptSig)
})