Skip to content

Commit d150fe3

Browse files
committed
refactor: use CWallet const shared pointers in dump{privkey,wallet} RPCs
1 parent ec2792d commit d150fe3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wallet/rpcdump.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ RPCHelpMan dumpprivkey()
681681
},
682682
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
683683
{
684-
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
684+
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
685685
if (!pwallet) return NullUniValue;
686686

687687
const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(*pwallet);
@@ -731,10 +731,10 @@ RPCHelpMan dumpwallet()
731731
},
732732
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
733733
{
734-
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
734+
const std::shared_ptr<const CWallet> pwallet = GetWalletForJSONRPCRequest(request);
735735
if (!pwallet) return NullUniValue;
736736

737-
CWallet& wallet = *pwallet;
737+
const CWallet& wallet = *pwallet;
738738
const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(wallet);
739739

740740
// Make sure the results are valid at least up to the most recent block

0 commit comments

Comments
 (0)