Browse Source

tests: add signature invalidation test for setLockTime

hk-custom-address
Daniel Cousens 9 years ago
parent
commit
8a37c1193a
  1. 11
      test/transaction_builder.js

11
test/transaction_builder.js

@ -241,6 +241,17 @@ describe('TransactionBuilder', function () {
})
})
describe('setLockTime', function () {
it('throws if if there exist any scriptSigs', function () {
txb.addInput(txHash, 0)
txb.sign(0, keyPair)
assert.throws(function () {
txb.setLockTime(65535)
}, /No, this would invalidate signatures/)
})
})
describe('sign', function () {
fixtures.invalid.sign.forEach(function (f) {
it('throws on ' + f.exception + (f.description ? ' (' + f.description + ')' : ''), function () {

Loading…
Cancel
Save