File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -225,12 +225,10 @@ function isMultisigOutput (script) {
225225 if ( chunks [ chunks . length - 1 ] !== OPS . OP_CHECKMULTISIG ) return false
226226
227227 var mOp = chunks [ 0 ]
228- if ( mOp === OPS . OP_0 ) return false
229228 if ( mOp < OPS . OP_1 ) return false
230229 if ( mOp > OPS . OP_16 ) return false
231230
232231 var nOp = chunks [ chunks . length - 2 ]
233- if ( nOp === OPS . OP_0 ) return false
234232 if ( nOp < OPS . OP_1 ) return false
235233 if ( nOp > OPS . OP_16 ) return false
236234
@@ -239,7 +237,7 @@ function isMultisigOutput (script) {
239237 if ( n < m ) return false
240238
241239 var pubKeys = chunks . slice ( 1 , - 2 )
242- if ( n < pubKeys . length ) return false
240+ if ( n !== pubKeys . length ) return false
243241
244242 return pubKeys . every ( isCanonicalPubKey )
245243}
Original file line number Diff line number Diff line change 241241 "description" : " n < len(pubKeys)" ,
242242 "scriptPubKey" : " OP_2 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 02b80011a883a0fd621ad46dfc405df1e74bf075cbaf700fd4aebef6e96f848340 024289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a34 OP_2 OP_CHECKMULTISIG"
243243 },
244+ {
245+ "description" : " n > len(pubKeys)" ,
246+ "scriptPubKey" : " OP_1 024289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a34 OP_2 OP_CHECKMULTISIG"
247+ },
244248 {
245249 "description" : " non-canonical pubKey (bad length)" ,
246250 "scriptPubKey" : " OP_1 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ffff OP_1 OP_CHECKMULTISIG"
You can’t perform that action at this time.
0 commit comments