diff options
| author | Jeff Garzik <[email protected]> | 2012-09-01 12:30:13 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-09-01 12:30:13 -0700 |
| commit | 0e1be81a4ad059ee4d5a81b616a51a07fd3b5720 (patch) | |
| tree | cd8af4b4231bae5e05e0547ba8cfdf23cdbe13c6 /src/rpcmining.cpp | |
| parent | Merge pull request #1770 from laanwj/2012_08_rpcconsoleparsing2 (diff) | |
| parent | Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided (diff) | |
| download | discoin-0e1be81a4ad059ee4d5a81b616a51a07fd3b5720.tar.xz discoin-0e1be81a4ad059ee4d5a81b616a51a07fd3b5720.zip | |
Merge pull request #1771 from luke-jr/bugfix_bip22_mode
Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index d2cb31f51..2954b9ee5 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -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"); } |