diff options
| author | Pieter Wuille <[email protected]> | 2018-10-19 19:02:20 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-10-19 19:02:41 -0700 |
| commit | dc1e54206d76e5fa378d28a18ae1fb2bcf714485 (patch) | |
| tree | 7967bd7a7c908e7817714bcfce628aaadf1d1947 | |
| parent | Merge #14426: utils: Fix broken Windows filelock (diff) | |
| parent | bitcoin-tx: Use constant for n pubkeys check (diff) | |
| download | discoin-dc1e54206d76e5fa378d28a18ae1fb2bcf714485.tar.xz discoin-dc1e54206d76e5fa378d28a18ae1fb2bcf714485.zip | |
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
| -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 a3fcb8767..6d86581ac 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."); |