diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-10-19 19:02:20 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-10-19 19:02:41 -0700 |
commit | dc1e54206d76e5fa378d28a18ae1fb2bcf714485 (patch) | |
tree | 7967bd7a7c908e7817714bcfce628aaadf1d1947 /src | |
parent | b2863c0685a5c12f829095cbabaf26ccc49e46ec (diff) | |
parent | 1f01fe0257b4883fc6c5893adfdcc2aa128edd71 (diff) |
Merge #14474: bitcoin-tx: Use constant for n pubkeys check
1f01fe0257 bitcoin-tx: Use constant for n pubkeys check (Antoine Le Calvez)
Pull request description:
Use the constant for the maximum number of public keys in a multisig script defined in script/script.h instead of hardcoding it.
Tree-SHA512: 83e6c46df907944d0d993159955e402784415536d61fdb5a5becba2b042e37ad2a291b27301c1b169416cb71c823a571d82257512cd4a64848a27a24c875fcc6
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."); |