Fix bug causing multisignature failure on IsStandard check

An off by one bug caused by inheritance from Bitcoin caused
multisignature transactions that were fully signed to be rejected
due to the number of stack items. The off-by-one bug has been fixed.
This commit is contained in:
cjepson 2016-02-07 22:28:51 -05:00 committed by John C. Vernaleo
parent 5076a00512
commit cb112a81e6

View File

@ -455,7 +455,7 @@ func expectedInputs(pops []parsedOpcode, class ScriptClass,
// the original bitcoind bug where OP_CHECKMULTISIG pops an
// additional item from the stack, add an extra expected input
// for the extra push that is required to compensate.
return asSmallInt(pops[0].opcode) + 1
return asSmallInt(pops[0].opcode)
case NullDataTy:
fallthrough