txb: do not classify blank input scripts as nonstandard
This commit is contained in:
parent
22ab90dee3
commit
1d6b978aff
2 changed files with 25 additions and 2 deletions
|
@ -47,6 +47,8 @@ function extractChunks (type, chunks, script) {
|
|||
}
|
||||
}
|
||||
function expandInput (scriptSig, witnessStack) {
|
||||
if (scriptSig.length === 0 && witnessStack.length === 0) return {}
|
||||
|
||||
var prevOutScript
|
||||
var prevOutType
|
||||
var scriptType
|
||||
|
@ -546,7 +548,7 @@ TransactionBuilder.prototype.__addInputUnsafe = function (txHash, vout, options)
|
|||
|
||||
// derive what we can from the scriptSig
|
||||
if (options.script !== undefined) {
|
||||
input = expandInput(options.script, options.witness)
|
||||
input = expandInput(options.script, options.witness || [])
|
||||
}
|
||||
|
||||
// if an input value was given, retain it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue