Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided

This commit is contained in:
Luke Dashjr 2012-09-01 07:12:50 +00:00
parent 7600e7fc39
commit 0689a7eb9c

View file

@ -228,6 +228,10 @@ Value getblocktemplate(const Array& params, bool fHelp)
const Value& modeval = find_value(oparam, "mode");
if (modeval.type() == str_type)
strMode = modeval.get_str();
else if (modeval.type() == null_type)
{
/* Do nothing */
}
else
throw JSONRPCError(-8, "Invalid mode");
}