refactor: Drop ::HasWallets()
This commit is contained in:
1 parent
f154071ec8
commit
ccf1f6ea24
3 files changed
+1
-8
No files matched your search
@@ -106,7 +106,7 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques
|
|||||||
return wallets[0];
|
return wallets[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!HasWallets()) {
|
if (wallets.empty()) {
|
||||||
throw JSONRPCError(
|
throw JSONRPCError(
|
||||||
RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
|
RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,12 +77,6 @@ bool RemoveWallet(const std::shared_ptr<CWallet>& wallet)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HasWallets()
|
|
||||||
{
|
|
||||||
LOCK(cs_wallets);
|
|
||||||
return !vpwallets.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::shared_ptr<CWallet>> GetWallets()
|
std::vector<std::shared_ptr<CWallet>> GetWallets()
|
||||||
{
|
{
|
||||||
LOCK(cs_wallets);
|
LOCK(cs_wallets);
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ void UnloadWallet(std::shared_ptr<CWallet>&& wallet);
|
|||||||
|
|
||||||
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
|
bool AddWallet(const std::shared_ptr<CWallet>& wallet);
|
||||||
bool RemoveWallet(const std::shared_ptr<CWallet>& wallet);
|
bool RemoveWallet(const std::shared_ptr<CWallet>& wallet);
|
||||||
bool HasWallets();
|
|
||||||
std::vector<std::shared_ptr<CWallet>> GetWallets();
|
std::vector<std::shared_ptr<CWallet>> GetWallets();
|
||||||
std::shared_ptr<CWallet> GetWallet(const std::string& name);
|
std::shared_ptr<CWallet> GetWallet(const std::string& name);
|
||||||
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocation& location, bilingual_str& error, std::vector<bilingual_str>& warnings);
|
std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocation& location, bilingual_str& error, std::vector<bilingual_str>& warnings);
|
||||||
|
|||||||
Reference in new issue
Block a user