aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-03-19 16:49:53 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-03-19 16:49:55 -0400
commit8ee5c7b747171e335793c74cd9d2f7491da58164 (patch)
tree853cef2303289be82a5c002d409c0a0825e640b1 /src/wallet/rpcwallet.cpp
parentee7b67e2784a5f08dffa6b05cee0e64c53a693c8 (diff)
parente5468a19d14a32715097435df778d43efcceaa11 (diff)
Merge #12727: [RPC] Remove unreachable help conditions in rpcwallet.cpp
e5468a19d1 Remove unreachable help conditions (lutangar) Pull request description: These conditions on `request.fHelp`, which appears in the body of the following functions are never reached: * `walletpassphrase` * `walletpassphrasechange` * `encryptwallet` ``` ... if (request.fHelp || request.params.size() != 0) { throw std::runtime_error(""); } ... if (request.fHelp) return true; ... ``` The first condition would throw if `request.fHelp` evaluates to `true`. Tree-SHA512: 1aa41ed233c6bebae27151ab5cc67144d2a408335a3acef3c103e144d6343685f360b1146e14bc8dc1d53d00fcfc6ff1ab6a0eeb0805191172a23b306ab50b79
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 9aae1a5e55..fd13d8c542 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2363,8 +2363,6 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
- if (request.fHelp)
- return true;
if (!pwallet->IsCrypted()) {
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrase was called.");
}
@@ -2429,8 +2427,6 @@ UniValue walletpassphrasechange(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
- if (request.fHelp)
- return true;
if (!pwallet->IsCrypted()) {
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletpassphrasechange was called.");
}
@@ -2485,8 +2481,6 @@ UniValue walletlock(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
- if (request.fHelp)
- return true;
if (!pwallet->IsCrypted()) {
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an unencrypted wallet, but walletlock was called.");
}
@@ -2532,8 +2526,6 @@ UniValue encryptwallet(const JSONRPCRequest& request)
LOCK2(cs_main, pwallet->cs_wallet);
- if (request.fHelp)
- return true;
if (pwallet->IsCrypted()) {
throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: running with an encrypted wallet, but encryptwallet was called.");
}