aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/addresses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc/addresses.cpp')
-rw-r--r--src/wallet/rpc/addresses.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/wallet/rpc/addresses.cpp b/src/wallet/rpc/addresses.cpp
index bed9ec029a..17bb6320a1 100644
--- a/src/wallet/rpc/addresses.cpp
+++ b/src/wallet/rpc/addresses.cpp
@@ -2,9 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#if defined(HAVE_CONFIG_H)
-#include <config/bitcoin-config.h>
-#endif
+#include <config/bitcoin-config.h> // IWYU pragma: keep
#include <core_io.h>
#include <key_io.h>
@@ -208,9 +206,9 @@ RPCHelpMan listaddressgroupings()
addressInfo.push_back(address_book_entry->GetLabel());
}
}
- jsonGrouping.push_back(addressInfo);
+ jsonGrouping.push_back(std::move(addressInfo));
}
- jsonGroupings.push_back(jsonGrouping);
+ jsonGroupings.push_back(std::move(jsonGrouping));
}
return jsonGroupings;
},
@@ -409,9 +407,9 @@ public:
// Only when the script corresponds to an address.
UniValue subobj(UniValue::VOBJ);
UniValue detail = DescribeAddress(embedded);
- subobj.pushKVs(detail);
+ subobj.pushKVs(std::move(detail));
UniValue wallet_detail = std::visit(*this, embedded);
- subobj.pushKVs(wallet_detail);
+ subobj.pushKVs(std::move(wallet_detail));
subobj.pushKV("address", EncodeDestination(embedded));
subobj.pushKV("scriptPubKey", HexStr(subscript));
// Always report the pubkey at the top level, so that `getnewaddress()['pubkey']` always works.
@@ -492,7 +490,7 @@ static UniValue DescribeWalletAddress(const CWallet& wallet, const CTxDestinatio
CScript script = GetScriptForDestination(dest);
std::unique_ptr<SigningProvider> provider = nullptr;
provider = wallet.GetSolvingProvider(script);
- ret.pushKVs(detail);
+ ret.pushKVs(std::move(detail));
ret.pushKVs(std::visit(DescribeWalletAddressVisitor(provider.get()), dest));
return ret;
}
@@ -609,7 +607,7 @@ RPCHelpMan getaddressinfo()
ret.pushKV("iswatchonly", bool(mine & ISMINE_WATCH_ONLY));
UniValue detail = DescribeWalletAddress(*pwallet, dest);
- ret.pushKVs(detail);
+ ret.pushKVs(std::move(detail));
ret.pushKV("ischange", ScriptIsChange(*pwallet, scriptPubKey));
@@ -690,7 +688,7 @@ RPCHelpMan getaddressesbylabel()
// which currently is O(1).
UniValue value(UniValue::VOBJ);
value.pushKV("purpose", _purpose ? PurposeToString(*_purpose) : "unknown");
- ret.pushKVEnd(address, value);
+ ret.pushKVEnd(address, std::move(value));
}
});