script: avoid slice if n !== pubKeys.length
This commit is contained in:
parent
0ca1e40a6d
commit
173994c6e0
1 changed files with 2 additions and 4 deletions
|
@ -242,11 +242,9 @@ function isMultisigOutput (script) {
|
|||
if (m <= 0) return false
|
||||
if (m > n) return false
|
||||
if (n > 16) return false
|
||||
if (n !== chunks.length - 3) return false
|
||||
|
||||
var pubKeys = chunks.slice(1, -2)
|
||||
if (n !== pubKeys.length) return false
|
||||
|
||||
return pubKeys.every(isCanonicalPubKey)
|
||||
return chunks.slice(1, -2).every(isCanonicalPubKey)
|
||||
}
|
||||
|
||||
function isNullDataOutput (script) {
|
||||
|
|
Loading…
Add table
Reference in a new issue