From 87e976a732988a9469d63ee0a64f65c767ae2993 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Wed, 25 Sep 2013 17:37:36 +0100 Subject: [PATCH] Add comment explaining OP_RESERVED behaviour with push ops. --- opcode.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opcode.go b/opcode.go index 2edde0ae..ac7feef5 100644 --- a/opcode.go +++ b/opcode.go @@ -653,7 +653,8 @@ func (pop *parsedOpcode) conditional() bool { func (pop *parsedOpcode) exec(s *Script) error { // *sigh* bitcoind pretty much mandates that we violate layering here. // Any opcode that isn't just adding data to the stack counts here - // as an operation. + // as an operation. Note that OP_RESERVED is less than OP_16 and thus + // is counted as a push opcode here. if pop.opcode.value > OP_16 { s.numOps++ if s.numOps > MaxOpsPerScript {