This commit is contained in:
blackjok3r
2018-11-11 06:29:06 +08:00
parent b6f711b69d
commit 1d3226eafa

View File

@@ -526,10 +526,8 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
{
const UniValue& oparam = params[0].get_obj();
const UniValue& modeval = find_value(oparam, "mode");
if (modeval.isStr()) {
if (modeval.isStr())
strMode = modeval.get_str();
fprintf(stderr, "%s\n",strMode.c_str());
}
else if (modeval.isNull())
{
strMode = "template";
@@ -571,6 +569,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
return BIP22ValidationResult(state);
}
}
fprintf(stderr, "%s\n",strMode.c_str());
if (strMode != "template" || strMode != "disablecb")
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");