3104 | @@ -3081,9 +3105,9 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
3105 | {
3106 | {
3107 | LOCK(cs_main);
3108 | + CBlockIndex *pindex = nullptr; // Use a temp pindex instead of ppindex to avoid a const_cast
3109 | for (const CBlockHeader& header : headers) {
3110 | - CBlockIndex *pindex = nullptr; // Use a temp pindex instead of ppindex to avoid a const_cast
3111 | - if (!AcceptBlockHeader(header, state, chainparams, &pindex)) {
3112 | + if (!AcceptBlockHeader(header, state, chainparams, &pindex, pindex)) {
Drop the {, if the following line is just return false.
if (!AcceptBlockHeader(header, state, chainparams, &pindex, pindex)) return false;