mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-24 07:28:02 +01:00
Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
This commit is contained in:
parent
7600e7fc39
commit
0689a7eb9c
1 changed files with 4 additions and 0 deletions
|
@ -228,6 +228,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…
Add table
Reference in a new issue