aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-09-01 07:12:50 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-09-01 07:12:56 +0000
commit0689a7eb9ce0ae4b5f6e521b23103bcecf41b775 (patch)
tree36ee555f77aa32c3a3bb7948477d00e32ccf4ce3 /src/rpcmining.cpp
parent7600e7fc399b46bf126e22fa8681d812c844124e (diff)
Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 5d983d21d4..aac040c496 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -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");
}