Add explicit braces to avoid ambiguous else

This commit is contained in:
chromatic 2021-08-22 12:34:59 -07:00
parent aeccc23943
commit a9a5736df8

View file

@ -151,13 +151,14 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
} }
} }
std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(*pblock); std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(*pblock);
if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) if (!ProcessNewBlock(Params(), shared_pblock, true, NULL)) {
if (nMineAuxPow) { if (nMineAuxPow) {
continue; continue;
} }
else { else {
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
} }
}
++nHeight; ++nHeight;
blockHashes.push_back(pblock->GetHash().GetHex()); blockHashes.push_back(pblock->GetHash().GetHex());