script: n/m must be numbers, not data
This commit is contained in:
parent
a686817f3c
commit
74c2f1d957
1 changed files with 2 additions and 0 deletions
|
@ -225,10 +225,12 @@ function isMultisigOutput (script) {
|
||||||
if (chunks[chunks.length - 1] !== OPS.OP_CHECKMULTISIG) return false
|
if (chunks[chunks.length - 1] !== OPS.OP_CHECKMULTISIG) return false
|
||||||
|
|
||||||
var mOp = chunks[0]
|
var mOp = chunks[0]
|
||||||
|
if (!types.Number(mOp)) return false
|
||||||
if (mOp < OPS.OP_1) return false
|
if (mOp < OPS.OP_1) return false
|
||||||
if (mOp > OPS.OP_16) return false
|
if (mOp > OPS.OP_16) return false
|
||||||
|
|
||||||
var nOp = chunks[chunks.length - 2]
|
var nOp = chunks[chunks.length - 2]
|
||||||
|
if (!types.Number(nOp)) return false
|
||||||
if (nOp < OPS.OP_1) return false
|
if (nOp < OPS.OP_1) return false
|
||||||
if (nOp > OPS.OP_16) return false
|
if (nOp > OPS.OP_16) return false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue