From f3e4968626c37b5bd90ad29fc0d9b9bacd838466 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 16 Dec 2016 10:44:04 +1300 Subject: [PATCH] Only enable getblocktemplate when wallet is enabled --- src/rpcmining.cpp | 2 ++ src/rpcserver.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index d58e70adc..474541bd4 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -401,6 +401,7 @@ static Value BIP22ValidationResult(const CValidationState& state) return "valid?"; } +#ifdef ENABLE_WALLET Value getblocktemplate(const Array& params, bool fHelp) { if (fHelp || params.size() > 1) @@ -694,6 +695,7 @@ Value getblocktemplate(const Array& params, bool fHelp) return result; } +#endif class submitblock_StateCatcher : public CValidationInterface { diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index e354e91a4..00ea417c3 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -302,7 +302,9 @@ static const CRPCCommand vRPCCommands[] = { "blockchain", "verifychain", &verifychain, true }, /* Mining */ +#ifdef ENABLE_WALLET { "mining", "getblocktemplate", &getblocktemplate, true }, +#endif { "mining", "getmininginfo", &getmininginfo, true }, { "mining", "getlocalsolps", &getlocalsolps, true }, { "mining", "getnetworksolps", &getnetworksolps, true },