|
|
|
@ -75,11 +75,6 @@ bool EnsureWalletIsAvailable(CWallet * const pwallet, bool avoidException)
|
|
|
|
|
if (pwallet) return true;
|
|
|
|
|
if (avoidException) return false;
|
|
|
|
|
if (!HasWallets()) {
|
|
|
|
|
// Note: It isn't currently possible to trigger this error because
|
|
|
|
|
// wallet RPC methods aren't registered unless a wallet is loaded. But
|
|
|
|
|
// this error is being kept as a precaution, because it's possible in
|
|
|
|
|
// the future that wallet RPC methods might get or remain registered
|
|
|
|
|
// when no wallets are loaded.
|
|
|
|
|
throw JSONRPCError(
|
|
|
|
|
RPC_METHOD_NOT_FOUND, "Method not found (wallet method is disabled because no wallet is loaded)");
|
|
|
|
|
}
|
|
|
|
|