aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.cpp
diff options
context:
space:
mode:
authorDavid Hill <dhill@mindcry.org>2015-10-13 09:56:45 -0400
committerDavid Hill <dhill@mindcry.org>2015-10-15 09:48:15 -0400
commitb48da5c1894a70f8fa2a50deb2e056c38ed27ecb (patch)
tree39578acf78c9cfd4029d8b98bf1d05863058abcd /src/script/script.cpp
parentd78a880900c15c7a28ae81e6632090f25fea7fce (diff)
downloadbitcoin-b48da5c1894a70f8fa2a50deb2e056c38ed27ecb.tar.xz
script: Remove magic numbers
This adds two new constants, MAX_OPS_PER_SCRIPT and MAX_PUBKEYS_PER_MULTISIG.
Diffstat (limited to 'src/script/script.cpp')
-rw-r--r--src/script/script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 9a0c067a33..263c89defe 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -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;
}