From 0689a7eb9ce0ae4b5f6e521b23103bcecf41b775 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 1 Sep 2012 07:12:50 +0000 Subject: [PATCH] Bugfix: getblocktemplate: Accept optional "mode" parameter not being provided --- src/rpcmining.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 5d983d21d..aac040c49 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"); }