Skip to content

Commit

Permalink
Merge pull request #1771 from luke-jr/bugfix_bip22_mode
Browse files Browse the repository at this point in the history
Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
  • Loading branch information
Jeff Garzik committed Sep 1, 2012
2 parents 90489ae + 0689a7e commit 0e1be81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpcmining.cpp
Expand Up @@ -225,6 +225,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");
}
Expand Down

0 comments on commit 0e1be81

Please sign in to comment.