Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
This commit is contained in:
+1
-1
@@ -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