Skip to content

Commit ccf1f6e

Browse files
committed
refactor: Drop ::HasWallets()
1 parent f154071 commit ccf1f6e

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques
106106
return wallets[0];
107107
}
108108

109-
if (!HasWallets()) {
109+
if (wallets.empty()) {
110110
throw JSONRPCError(
111111
RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
112112
}

src/wallet/wallet.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ bool RemoveWallet(const std::shared_ptr<CWallet>& wallet)
7777
return true;
7878
}
7979

80-
bool HasWallets()
81-
{
82-
LOCK(cs_wallets);
83-
return !vpwallets.empty();
84-
}
85-
8680
std::vector<std::shared_ptr<CWallet>> GetWallets()
8781
{
8882
LOCK(cs_wallets);

src/wallet/wallet.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ void UnloadWallet(std::shared_ptr<CWallet>&& wallet);
5151

5252
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
5353
bool RemoveWallet(const std::shared_ptr<CWallet>& wallet);
54-
bool HasWallets();
5554
std::vector<std::shared_ptr<CWallet>> GetWallets();
5655
std::shared_ptr<CWallet> GetWallet(const std::string& name);
5756
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocation& location, bilingual_str& error, std::vector<bilingual_str>& warnings);

0 commit comments

Comments
 (0)