mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
script: Remove magic numbers
This adds two new constants, MAX_OPS_PER_SCRIPT and MAX_PUBKEYS_PER_MULTISIG.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user