aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-26 09:35:17 -0400
committerRussell Yanofsky <russ@yanofsky.org>2017-07-26 09:35:17 -0400
commitdf389bca2048f5814387987463fe3298766bc6b6 (patch)
tree3fd579eeb207ec7757728d82f5dc228f27ceff11
parente526b3d34c20cd723b08252638d10a7584b697cb (diff)
Change wallet method disabled error text
Not strictly backwards compatible because the error is not new in this release.
-rw-r--r--src/wallet/rpcwallet.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 64dc70f2a4..14560860cb 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -60,8 +60,13 @@ bool EnsureWalletIsAvailable(CWallet * const pwallet, bool avoidException)
if (pwallet) return true;
if (avoidException) return false;
if (::vpwallets.empty()) {
- // Wallet RPC methods are disabled if no wallets are loaded.
- throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found (disabled)");
+ // 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)");
}
throw JSONRPCError(RPC_WALLET_NOT_SPECIFIED,
"Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).");