txb: enforce outputs exist when signing

This commit is contained in:
Daniel Cousens 2018-07-27 15:55:17 +10:00
parent acdfb34545
commit ed1c1a5661
3 changed files with 26 additions and 2 deletions

View file

@ -313,6 +313,7 @@ describe('TransactionBuilder', function () {
it('throws if if there exist any scriptSigs', function () {
const txb = new TransactionBuilder()
txb.addInput(txHash, 0)
txb.addOutput(scripts[0], 100)
txb.sign(0, keyPair)
assert.throws(function () {