TxBuilder: missing redeemScript not an issue if already added
If the input is initialized, we already have the redeemScript, no need to pass it in again
This commit is contained in:
parent
8a8f40e903
commit
b55e3a0245
1 changed files with 0 additions and 7 deletions
|
@ -289,13 +289,6 @@ TransactionBuilder.prototype.sign = function(index, privKey, redeemScript, hashT
|
||||||
|
|
||||||
// are we already initialized?
|
// are we already initialized?
|
||||||
if (input.initialized) {
|
if (input.initialized) {
|
||||||
if (input.prevOutType === 'scripthash') {
|
|
||||||
assert(input.redeemScript, 'PrevOutScript is P2SH, missing redeemScript')
|
|
||||||
|
|
||||||
} else {
|
|
||||||
assert(!input.redeemScript, 'PrevOutScript must be P2SH')
|
|
||||||
}
|
|
||||||
|
|
||||||
// redeemScript only needed to initialize, but if provided again, enforce consistency
|
// redeemScript only needed to initialize, but if provided again, enforce consistency
|
||||||
if (redeemScript) {
|
if (redeemScript) {
|
||||||
assert.deepEqual(input.redeemScript, redeemScript, 'Inconsistent redeemScript')
|
assert.deepEqual(input.redeemScript, redeemScript, 'Inconsistent redeemScript')
|
||||||
|
|
Loading…
Reference in a new issue