mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Introduce constant for maximum CScript length
This commit is contained in:
parent
c4e8390047
commit
f8e6fb1800
2 changed files with 4 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
|
|||
vector<bool> vfExec;
|
||||
vector<valtype> altstack;
|
||||
set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
|
||||
if (script.size() > 10000)
|
||||
if (script.size() > MAX_SCRIPT_SIZE)
|
||||
return set_error(serror, SCRIPT_ERR_SCRIPT_SIZE);
|
||||
int nOpCount = 0;
|
||||
bool fRequireMinimal = (flags & SCRIPT_VERIFY_MINIMALDATA) != 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue