TxBuilder: avoid unnecessary assertion, already done in classification
This commit is contained in:
parent
e33a6409d3
commit
c7c58307f0
1 changed files with 1 additions and 2 deletions
|
@ -20,14 +20,13 @@ function extractInput(txIn) {
|
|||
var prevOutType = scripts.classifyInput(scriptSig, true)
|
||||
var scriptType
|
||||
|
||||
// Re-classify if P2SH
|
||||
// Re-classify if scriptHash
|
||||
if (prevOutType === 'scripthash') {
|
||||
redeemScript = Script.fromBuffer(scriptSig.chunks.slice(-1)[0])
|
||||
prevOutScript = scripts.scriptHashOutput(redeemScript.getHash())
|
||||
|
||||
scriptSig = Script.fromChunks(scriptSig.chunks.slice(0, -1))
|
||||
scriptType = scripts.classifyInput(scriptSig, true)
|
||||
assert.equal(scripts.classifyOutput(redeemScript), scriptType, 'Non-matching scriptSig and scriptPubKey in input')
|
||||
|
||||
} else {
|
||||
scriptType = prevOutType
|
||||
|
|
Loading…
Reference in a new issue