fix
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user