diff options
| author | MarcoFalke <[email protected]> | 2020-06-11 10:35:13 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-06-11 12:39:22 -0400 |
| commit | fadf6bd04f002d05aaff8eba74015e25a41966bc (patch) | |
| tree | 3cda0d6081bbbe2f4be5b230572ea1e2766e3b32 /src | |
| parent | wallet: Make RPC help compile-time static (diff) | |
| download | discoin-fadf6bd04f002d05aaff8eba74015e25a41966bc.tar.xz discoin-fadf6bd04f002d05aaff8eba74015e25a41966bc.zip | |
refactor: Remove unused request.fHelp
Diffstat (limited to 'src')
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a4120c45e..0907f2aab 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -93,6 +93,7 @@ bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest& request, std::string& std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request) { + CHECK_NONFATAL(!request.fHelp); std::string wallet_name; if (GetWalletNameFromJSONRPCRequest(request, wallet_name)) { std::shared_ptr<CWallet> pwallet = GetWallet(wallet_name); @@ -101,12 +102,10 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques } std::vector<std::shared_ptr<CWallet>> wallets = GetWallets(); - if (wallets.size() == 1 || (request.fHelp && wallets.size() > 0)) { + if (wallets.size() == 1) { return wallets[0]; } - if (request.fHelp) return nullptr; - if (!HasWallets()) { throw JSONRPCError( RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)"); |