scripts: recursive scriptHash no longer problematic

This commit is contained in:
Daniel Cousens 2014-06-24 17:47:16 +10:00
parent c637cb4be7
commit 8b1e2c5e1e

View file

@ -35,13 +35,12 @@ function classifyOutput(script) {
} }
} }
function classifyInput(script, checkScriptHash) { function classifyInput(script) {
assert(script instanceof Script, 'Expected Script, got ', script) assert(script instanceof Script, 'Expected Script, got ', script)
if (checkScriptHash === undefined) checkScriptHash = true
if (isPubKeyHashInput.call(script)) { if (isPubKeyHashInput.call(script)) {
return 'pubkeyhash' return 'pubkeyhash'
} else if (checkScriptHash && isScriptHashInput.call(script)) { } else if (isScriptHashInput.call(script)) {
return 'scripthash' return 'scripthash'
} else if (isMultisigInput.call(script)) { } else if (isMultisigInput.call(script)) {
return 'multisig' return 'multisig'