script: Remove magic numbers

This adds two new constants, MAX_OPS_PER_SCRIPT and
MAX_PUBKEYS_PER_MULTISIG.
This commit is contained in:
David Hill
2015-10-13 09:56:45 -04:00
parent d78a880900
commit b48da5c189
3 changed files with 12 additions and 5 deletions

View File

@@ -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;
}