TxBuilder: throw on keyPair network inconsistency
This commit is contained in:
parent
2971816588
commit
1e90e1620a
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue