diff options
Diffstat (limited to 'script.cpp')
-rw-r--r-- | script.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/script.cpp b/script.cpp index 730c4986d2..a09031bad5 100644 --- a/script.cpp +++ b/script.cpp @@ -776,16 +776,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co return false; int nKeysCount = CastToBigNum(stacktop(-i)).getint(); - if (nKeysCount < 0) + if (nKeysCount < 0 || nKeysCount > 20) + return false; + nOpCount += nKeysCount; + if (nOpCount > 201) 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) |