style-only: Remove redundant scope in *Chainstate

I strongly recommend reviewing with the following git-diff flags:
  --ignore-space-change
This commit is contained in:
Carl Dong
2021-12-07 12:06:03 -05:00
parent 89bec827fd
commit 7f15eff2dd

View File

@ -26,7 +26,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
return fReset || fReindexChainState || chainstate->CoinsTip().GetBestBlock().IsNull();
};
{
LOCK(cs_main);
chainman.InitializeChainstate(mempool);
chainman.m_total_coinstip_cache = nCoinCacheUsage;
@ -121,7 +120,6 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
return ChainstateLoadingError::ERROR_BLOCKS_WITNESS_INSUFFICIENTLY_VALIDATED;
}
}
}
return std::nullopt;
}
@ -138,7 +136,6 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
return fReset || fReindexChainState || chainstate->CoinsTip().GetBestBlock().IsNull();
};
{
LOCK(cs_main);
for (CChainState* chainstate : chainman.GetAll()) {
@ -156,7 +153,6 @@ std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManage
}
}
}
}
return std::nullopt;
}