aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-10-23 11:22:00 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-10-23 11:50:10 +0200
commit923c5e93a90a6eddde3ab8589fc393da95bbc489 (patch)
tree1138bc84e9c0c8fa16cf9f9e067c276c0daee4cf /src/script/script.h
parentfa1d252e82a8ea76fd6691955eae5cae6ec8bc5a (diff)
parentb48da5c1894a70f8fa2a50deb2e056c38ed27ecb (diff)
downloadbitcoin-923c5e93a90a6eddde3ab8589fc393da95bbc489.tar.xz
Merge pull request #6818
b48da5c script: Remove magic numbers (David Hill)
Diffstat (limited to 'src/script/script.h')
-rw-r--r--src/script/script.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/script/script.h b/src/script/script.h
index cdc9a71bb2..a38d33a189 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -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.