Correct handling for multi-sig zero signatures.
It is possible for a multisignature transaction to require zero signatures. For example, input 2 of testnet transaction b2d93dfd0b2c1a380e55e76a8d9cb3075dec9f4474e9485be008c337fd62c1f7 in block number 185117. Previously the code was pushing a false to the stack when no valid signatures were found. This commit remedies that by pushing true when no valid signatures were found, but none are required. Otherwise it still pushes false when no valid signatures were found, but some are required. Fixes #7. ok @owainga
This commit is contained in:
parent
fcd73f75ea
commit
1d360509f4
1 changed files with 1 additions and 1 deletions
|
@ -1831,7 +1831,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, s *Script) error {
|
|||
}
|
||||
|
||||
if len(signatures) == 0 {
|
||||
s.dstack.PushBool(false)
|
||||
s.dstack.PushBool(nsig == 0)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue