aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-09-22 19:08:36 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-09-24 19:53:24 +0200
commitfa19bb2cd8c575593583138a84e6bb3444d6196d (patch)
treeaf0a4278e9139cbc524a284115e9e4d8aaa4294f /src/rpc/mining.cpp
parent1b313cacc99a1b372238f9036abed5491f9d28f7 (diff)
downloadbitcoin-fa19bb2cd8c575593583138a84e6bb3444d6196d.tar.xz
remove dead rpc code
Checking for fHelp, or the size of the args, is dead code because: * fHelp is always false (src/qt/test/rpcnestedtests.cpp) * It is already implicitly called by RPCHelpMan::Check (src/rpc/mining.cpp, src/rpc/misc.cpp, src/rpc/net.cpp)
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r--src/rpc/mining.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index b04e106b2d..9d40f0e988 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -242,12 +242,7 @@ static RPCHelpMan generatetodescriptor()
static RPCHelpMan generate()
{
return RPCHelpMan{"generate", "has been replaced by the -generate cli option. Refer to -help for more information.", {}, {}, RPCExamples{""}, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
-
- if (request.fHelp) {
- throw std::runtime_error(self.ToString());
- } else {
throw JSONRPCError(RPC_METHOD_NOT_FOUND, self.ToString());
- }
}};
}