mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
This commit is contained in:
@@ -385,7 +385,7 @@ static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& s
|
||||
CScript scriptPubKey = GetScriptForMultisig(required, pubkeys);
|
||||
|
||||
if (bSegWit) {
|
||||
for (CPubKey& pubkey : pubkeys) {
|
||||
for (const CPubKey& pubkey : pubkeys) {
|
||||
if (!pubkey.IsCompressed()) {
|
||||
throw std::runtime_error("Uncompressed pubkeys are not useable for SegWit outputs");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user