diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-26 15:11:17 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-11-10 17:12:41 +0100 |
commit | ec2792d1dc3404d749a43556eeb4b63780ee6d94 (patch) | |
tree | b89403af31bd5067636f7ea9c55c32b407293dec /src/wallet/rpcdump.cpp | |
parent | 29905c092f15bbbc4d4964c2f99dcf12fefd4111 (diff) | |
download | bitcoin-ec2792d1dc3404d749a43556eeb4b63780ee6d94.tar.xz |
refactor: use const `LegacyScriptPubKeyMan` references in dump{privkey,wallet} RPCs
Diffstat (limited to 'src/wallet/rpcdump.cpp')
-rw-r--r-- | src/wallet/rpcdump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index ccfb50c37c..2854e52f84 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -57,7 +57,7 @@ static std::string DecodeDumpString(const std::string &str) { return ret.str(); } -static bool GetWalletAddressesForKey(LegacyScriptPubKeyMan* spk_man, const CWallet& wallet, const CKeyID& keyid, std::string& strAddr, std::string& strLabel) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) +static bool GetWalletAddressesForKey(const LegacyScriptPubKeyMan* spk_man, const CWallet& wallet, const CKeyID& keyid, std::string& strAddr, std::string& strLabel) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) { bool fLabelFound = false; CKey key; @@ -684,7 +684,7 @@ RPCHelpMan dumpprivkey() std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request); if (!pwallet) return NullUniValue; - LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(*pwallet); + const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(*pwallet); LOCK2(pwallet->cs_wallet, spk_man.cs_KeyStore); @@ -735,7 +735,7 @@ RPCHelpMan dumpwallet() if (!pwallet) return NullUniValue; CWallet& wallet = *pwallet; - LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(wallet); + const LegacyScriptPubKeyMan& spk_man = EnsureConstLegacyScriptPubKeyMan(wallet); // Make sure the results are valid at least up to the most recent block // the user could have gotten from another RPC command prior to now |