Merge pull request #1771 from luke-jr/bugfix_bip22_mode

Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
pull/59/head
Jeff Garzik 12 years ago
commit 0e1be81a4a

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

Loading…
Cancel
Save