scripts: multisigInput only uses scriptPubKey for validation, OP_0 validation not necessary
This commit is contained in:
parent
b13271477c
commit
af3491822e
3 changed files with 7 additions and 25 deletions
src
|
@ -253,13 +253,8 @@ function multisigInput (signatures, scriptPubKey) {
|
|||
var m = mOp - (ops.OP_1 - 1)
|
||||
var n = nOp - (ops.OP_1 - 1)
|
||||
|
||||
var count = 0
|
||||
signatures.forEach(function (signature) {
|
||||
count += (signature !== ops.OP_0)
|
||||
})
|
||||
|
||||
assert(count >= m, 'Not enough signatures provided')
|
||||
assert(count <= n, 'Too many signatures provided')
|
||||
assert(signatures.length >= m, 'Not enough signatures provided')
|
||||
assert(signatures.length <= n, 'Too many signatures provided')
|
||||
}
|
||||
|
||||
return Script.fromChunks([].concat(ops.OP_0, signatures))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue