From 2205820299eefee6bdedbcb2188cd07e2bc51124 Mon Sep 17 00:00:00 2001 From: blackjok3r Date: Sun, 11 Nov 2018 06:11:19 +0800 Subject: [PATCH] fix --- src/rpcmining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 7d5b2ebdc..a3d7a5893 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -521,6 +521,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) UniValue lpval = NullUniValue; // TODO: Re-enable coinbasevalue once a specification has been written bool coinbasetxn = true; + std::string strMode; if (params.size() > 0) { const UniValue& oparam = params[0].get_obj(); @@ -529,7 +530,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) strMode = modeval.get_str(); else if (modeval.isNull()) { - std::string strMode = "template"; + strMode = "template"; } else throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");