mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +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:
@@ -17,7 +17,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
|
||||
// Maximum number of bytes pushable to the stack
|
||||
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520;
|
||||
|
||||
// Maximum number of non-push operations per script
|
||||
static const int MAX_OPS_PER_SCRIPT = 201;
|
||||
|
||||
// Maximum number of public keys per multisig
|
||||
static const int MAX_PUBKEYS_PER_MULTISIG = 20;
|
||||
|
||||
// Threshold for nLockTime: below this value it is interpreted as block number,
|
||||
// otherwise as UNIX timestamp.
|
||||
|
||||
Reference in New Issue
Block a user