Only enable getblocktemplate when wallet is enabled

This commit is contained in:
Jack Grigg
2016-12-16 10:44:04 +13:00
parent 611f25b604
commit f3e4968626
2 changed files with 4 additions and 0 deletions

View File

@@ -401,6 +401,7 @@ static Value BIP22ValidationResult(const CValidationState& state)
return "valid?"; return "valid?";
} }
#ifdef ENABLE_WALLET
Value getblocktemplate(const Array& params, bool fHelp) Value getblocktemplate(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() > 1) if (fHelp || params.size() > 1)
@@ -694,6 +695,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
return result; return result;
} }
#endif
class submitblock_StateCatcher : public CValidationInterface class submitblock_StateCatcher : public CValidationInterface
{ {

View File

@@ -302,7 +302,9 @@ static const CRPCCommand vRPCCommands[] =
{ "blockchain", "verifychain", &verifychain, true }, { "blockchain", "verifychain", &verifychain, true },
/* Mining */ /* Mining */
#ifdef ENABLE_WALLET
{ "mining", "getblocktemplate", &getblocktemplate, true }, { "mining", "getblocktemplate", &getblocktemplate, true },
#endif
{ "mining", "getmininginfo", &getmininginfo, true }, { "mining", "getmininginfo", &getmininginfo, true },
{ "mining", "getlocalsolps", &getlocalsolps, true }, { "mining", "getlocalsolps", &getlocalsolps, true },
{ "mining", "getnetworksolps", &getnetworksolps, true }, { "mining", "getnetworksolps", &getnetworksolps, true },