Use the constant for the maximum number of public keys in a multisig script defined in script/script.h instead of hardcoding it.
bitcoin-tx: Use constant for n pubkeys check #14474
pull alecalve wants to merge 1 commits into bitcoin:master from alecalve:bitcoin_tx_use_constant changing 1 files +1 −1-
alecalve commented at 10:03 AM on October 13, 2018: contributor
-
1f01fe0257
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.
- fanquake added the label Refactoring on Oct 13, 2018
-
meshcollider commented at 1:04 AM on October 14, 2018: contributor
-
in src/bitcoin-tx.cpp:359 in 1f01fe0257
355 | @@ -356,7 +356,7 @@ static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& s 356 | if (vStrInputParts.size() < numkeys + 3) 357 | throw std::runtime_error("incorrect number of multisig pubkeys"); 358 | 359 | - if (required < 1 || required > 20 || numkeys < 1 || numkeys > 20 || numkeys < required) 360 | + if (required < 1 || required > MAX_PUBKEYS_PER_MULTISIG || numkeys < 1 || numkeys > MAX_PUBKEYS_PER_MULTISIG || numkeys < required)
fanquake commented at 11:54 AM on October 14, 2018:fanquake commented at 11:54 AM on October 14, 2018: memberutACK 1f01fe0
sipa commented at 7:54 AM on October 17, 2018: memberutACK 1f01fe0257b4883fc6c5893adfdcc2aa128edd71
jgarzik commented at 12:49 PM on October 17, 2018: contributortested ACK
Sjors commented at 2:29 PM on October 17, 2018: memberSemi related, but this limit could use a test: https://github.com/bitcoin/bitcoin/blob/master/src/test/multisig_tests.cpp
fanquake added this to the "Mergeable" column in a project
IlyasRidhuan commented at 6:06 AM on October 19, 2018: nonesipa merged this on Oct 20, 2018sipa closed this on Oct 20, 2018sipa referenced this in commit dc1e54206d on Oct 20, 2018fanquake removed this from the "Mergeable" column in a project
alecalve deleted the branch on Oct 20, 2018jasonbcox referenced this in commit 154c52dc3d on Dec 20, 2019jonspock referenced this in commit 35e0f34d3e on Oct 2, 2020jonspock referenced this in commit 38419a43a6 on Oct 5, 2020jonspock referenced this in commit b4ddaba374 on Oct 10, 2020PastaPastaPasta referenced this in commit 031b0213cc on Jun 27, 2021PastaPastaPasta referenced this in commit 61655c0051 on Jun 28, 2021PastaPastaPasta referenced this in commit 24b1bc3ca5 on Jun 29, 2021PastaPastaPasta referenced this in commit f33eec6f9f on Jul 1, 2021PastaPastaPasta referenced this in commit 98d99a04e3 on Jul 1, 2021PastaPastaPasta referenced this in commit 29e098d992 on Jul 1, 2021PastaPastaPasta referenced this in commit 2df5880bcb on Jul 3, 2021MarcoFalke locked this on Sep 8, 2021Labels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me