From a9a5736df8e3678e546d51549ff3ce2e5a073a19 Mon Sep 17 00:00:00 2001 From: chromatic Date: Sun, 22 Aug 2021 12:34:59 -0700 Subject: [PATCH] Add explicit braces to avoid ambiguous else --- src/rpc/mining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 0637d6b33..0e5376990 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -151,13 +151,14 @@ UniValue generateBlocks(boost::shared_ptr coinbaseScript, int nG } } std::shared_ptr shared_pblock = std::make_shared(*pblock); - if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) + if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) { if (nMineAuxPow) { continue; } else { throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); } + } ++nHeight; blockHashes.push_back(pblock->GetHash().GetHex());