From 214d45b6b9a4f25d7d8bd4e5443fa2bee485353a Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Sun, 25 Aug 2013 12:37:07 -0400 Subject: Document and test OP_RESERVED weirdness Seems it was forgotten about when IsPushOnly() and the unittests were written. A particular oddity is that OP_RESERVED doesn't count towards the >201 opcode limit unlike every other named opcode. --- src/script.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index fd5b12921e..0ab47678e8 100644 --- a/src/script.h +++ b/src/script.h @@ -543,6 +543,10 @@ public: opcodetype opcode; if (!GetOp(pc, opcode)) return false; + // Note that IsPushOnly() *does* consider OP_RESERVED to be a + // push-type opcode, however execution of OP_RESERVED fails, so + // it's not relevant to P2SH as the scriptSig would fail prior to + // the P2SH special validation code being executed. if (opcode > OP_16) return false; } -- cgit v1.2.3