mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
script: Remove magic numbers
This adds two new constants, MAX_OPS_PER_SCRIPT and MAX_PUBKEYS_PER_MULTISIG.
This commit is contained in:
parent
d78a880900
commit
b48da5c189
3 changed files with 12 additions and 5 deletions
|
|
@ -170,7 +170,7 @@ unsigned int CScript::GetSigOpCount(bool fAccurate) const
|
|||
if (fAccurate && lastOpcode >= OP_1 && lastOpcode <= OP_16)
|
||||
n += DecodeOP_N(lastOpcode);
|
||||
else
|
||||
n += 20;
|
||||
n += MAX_PUBKEYS_PER_MULTISIG;
|
||||
}
|
||||
lastOpcode = opcode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue