From 3043dffcf58a15d7b94f822fbfc616d7f4c79e18 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sat, 1 Dec 2018 12:52:38 +0800 Subject: [PATCH] fix getblocktemplate --- src/rpc/mining.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index aed10944c..25b75c301 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -606,9 +606,10 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) return BIP22ValidationResult(state); } } - - if (strMode != "template") - throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); + else + { + strMode = "template"; + } bool fvNodesEmpty; {