aboutsummaryrefslogtreecommitdiff
path: root/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'script.cpp')
-rw-r--r--script.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/script.cpp b/script.cpp
index 9b30d5a1a4..730c4986d2 100644
--- a/script.cpp
+++ b/script.cpp
@@ -778,6 +778,14 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
int nKeysCount = CastToBigNum(stacktop(-i)).getint();
if (nKeysCount < 0)
return false;
+ if (nBestHeight > 84000)
+ {
+ if (nKeysCount > 20)
+ return false;
+ nOpCount += nKeysCount;
+ if (nOpCount > 201)
+ return false;
+ }
int ikey = ++i;
i += nKeysCount;
if (stack.size() < i)