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);
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());