mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-06 05:00:12 +02:00
refactor: use CWallet
const shared pointers in dump{privkey,wallet} RPCs
This commit is contained in:
parent
ec2792d1dc
commit
d150fe3ad5
@ -681,7 +681,7 @@ RPCHelpMan dumpprivkey()
|
||||
},
|
||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||
{
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
const std::shared_ptr<const CWallet> 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<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
const std::shared_ptr<const CWallet> 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user