aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-03-01 17:37:25 -0500
committerAndrew Chow <achow101-github@achow101.com>2021-06-24 14:08:46 -0400
commite6cf0ed92de31a5ac35a271b0da8f0a8364d1175 (patch)
treec963f0e090f205620a481ce94b9bfabd632aedd4 /src
parent3280704886b60644d103a5eb310691c003a39328 (diff)
wallet, rpc: listdescriptors does not need unlocked
With the last hardened xpub cache, we don't neeed to have the wallet be unlocked for listdescriptors.
Diffstat (limited to 'src')
-rw-r--r--src/wallet/rpcdump.cpp2
-rw-r--r--src/wallet/scriptpubkeyman.cpp3
2 files changed, 0 insertions, 5 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index c1e8b14b41..ead9e4cefb 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -1787,8 +1787,6 @@ RPCHelpMan listdescriptors()
throw JSONRPCError(RPC_WALLET_ERROR, "listdescriptors is not available for non-descriptor wallets");
}
- EnsureWalletIsUnlocked(*wallet);
-
LOCK(wallet->cs_wallet);
UniValue descriptors(UniValue::VARR);
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index ddb6b05071..2a3880f2d1 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -2269,9 +2269,6 @@ const std::vector<CScript> DescriptorScriptPubKeyMan::GetScriptPubKeys() const
bool DescriptorScriptPubKeyMan::GetDescriptorString(std::string& out) const
{
LOCK(cs_desc_man);
- if (m_storage.IsLocked()) {
- return false;
- }
FlatSigningProvider provider;
provider.keys = GetKeys();