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.
This commit is contained in:
parent
be992701b0
commit
1f01fe0257
1 changed files with 1 additions and 1 deletions
|
@ -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.");
|
||||
|
||||
|
|
Loading…
Reference in a new issue