diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -101,6 +101,7 @@ std::shared_ptr GetWalletForJSONRPCRequest(const JSONRPCRequest &request) { + CHECK_NONFATAL(!request.fHelp); std::string wallet_name; if (GetWalletNameFromJSONRPCRequest(request, wallet_name)) { std::shared_ptr pwallet = GetWallet(wallet_name); @@ -113,14 +114,10 @@ } std::vector> 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 "