diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -118,7 +118,7 @@ return wallets[0]; } - if (!HasWallets()) { + if (wallets.empty()) { throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled " "because no wallet is loaded)"); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -55,7 +55,6 @@ bool AddWallet(const std::shared_ptr &wallet); bool RemoveWallet(const std::shared_ptr &wallet); -bool HasWallets(); std::vector> GetWallets(); std::shared_ptr GetWallet(const std::string &name); std::shared_ptr LoadWallet(const CChainParams &chainParams, diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -74,11 +74,6 @@ return true; } -bool HasWallets() { - LOCK(cs_wallets); - return !vpwallets.empty(); -} - std::vector> GetWallets() { LOCK(cs_wallets); return vpwallets;