From cb112a81e607a6da5646300ea07a806c314db272 Mon Sep 17 00:00:00 2001 From: cjepson Date: Sun, 7 Feb 2016 22:28:51 -0500 Subject: [PATCH] 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. --- txscript/standard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/txscript/standard.go b/txscript/standard.go index 887d87b4..f68488e6 100644 --- a/txscript/standard.go +++ b/txscript/standard.go @@ -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