aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorPeter Todd <[email protected]>2013-08-25 12:37:07 -0400
committerPeter Todd <[email protected]>2013-08-25 12:37:07 -0400
commit214d45b6b9a4f25d7d8bd4e5443fa2bee485353a (patch)
tree8926dc1356e45bcef9a38813c7cf0dc6148bb16c /src/script.cpp
parentMerge pull request #2926 from Diapolo/model_checks (diff)
downloaddiscoin-214d45b6b9a4f25d7d8bd4e5443fa2bee485353a.tar.xz
discoin-214d45b6b9a4f25d7d8bd4e5443fa2bee485353a.zip
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.
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script.cpp b/src/script.cpp
index 2df2e9f0d..a3aae42d2 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -327,6 +327,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
return false;
if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
return false;
+
+ // Note how OP_RESERVED does not count towards the opcode limit.
if (opcode > OP_16 && ++nOpCount > 201)
return false;