diff options
author | Antoine Le Calvez <antoine@alc.io> | 2018-10-13 10:55:51 +0100 |
---|---|---|
committer | Antoine Le Calvez <antoine@alc.io> | 2018-10-13 10:55:51 +0100 |
commit | 1f01fe0257b4883fc6c5893adfdcc2aa128edd71 (patch) | |
tree | 281cb941a555569d5ca1476c533a4badc9328782 /src | |
parent | be992701b018f256db6d64786624be4cb60d8975 (diff) | |
download | bitcoin-1f01fe0257b4883fc6c5893adfdcc2aa128edd71.tar.xz |
bitcoin-tx: Use constant for n pubkeys check
Use the constant for the maximum number of public keys in a multisig
script defined in script/script.h instead of hardcoding it.
Diffstat (limited to 'src')
-rw-r--r-- | src/bitcoin-tx.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index a3fcb87675..6d86581ac6 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -356,7 +356,7 @@ static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& s if (vStrInputParts.size() < numkeys + 3) throw std::runtime_error("incorrect number of multisig pubkeys"); - if (required < 1 || required > 20 || numkeys < 1 || numkeys > 20 || numkeys < required) + if (required < 1 || required > MAX_PUBKEYS_PER_MULTISIG || numkeys < 1 || numkeys > MAX_PUBKEYS_PER_MULTISIG || numkeys < required) throw std::runtime_error("multisig parameter mismatch. Required " \ + std::to_string(required) + " of " + std::to_string(numkeys) + "signatures."); |