Browse Source

TxBuilder: throw on keyPair network inconsistency

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
1e90e1620a
  1. 1
      src/transaction_builder.js

1
src/transaction_builder.js

@ -282,6 +282,7 @@ TransactionBuilder.prototype.__build = function (allowIncomplete) {
}
TransactionBuilder.prototype.sign = function (index, keyPair, redeemScript, hashType) {
assert.equal(keyPair.network, this.network, 'Inconsistent network')
assert(index in this.inputs, 'No input at index: ' + index)
hashType = hashType || Transaction.SIGHASH_ALL

Loading…
Cancel
Save