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) {
|
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)
|
assert(index in this.inputs, 'No input at index: ' + index)
|
||||||
hashType = hashType || Transaction.SIGHASH_ALL
|
hashType = hashType || Transaction.SIGHASH_ALL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue