From d150fe3ad5ce181511f2d2fd035a10530eaa4203 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 26 Aug 2021 15:20:12 +0200 Subject: [PATCH] refactor: use `CWallet` const shared pointers in dump{privkey,wallet} RPCs --- src/wallet/rpcdump.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 2854e52f84..403c978680 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -681,7 +681,7 @@ RPCHelpMan dumpprivkey() }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { - std::shared_ptr const pwallet = GetWalletForJSONRPCRequest(request); + const std::shared_ptr pwallet = GetWalletForJSONRPCRequest(request); if (!pwallet) return NullUniValue; const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(*pwallet); @@ -731,10 +731,10 @@ RPCHelpMan dumpwallet() }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { - std::shared_ptr const pwallet = GetWalletForJSONRPCRequest(request); + const std::shared_ptr pwallet = GetWalletForJSONRPCRequest(request); if (!pwallet) return NullUniValue; - CWallet& wallet = *pwallet; + const CWallet& wallet = *pwallet; const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(wallet); // Make sure the results are valid at least up to the most recent block