style-only: Use for instead of when loading Chainstate

It's a bit clearer and restricts the scope of fLoaded
This commit is contained in:
Carl Dong 2022-02-22 14:20:55 -05:00
parent 5921b863e3
commit fe96a2e4bd

View file

@ -1420,8 +1420,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
assert(!node.chainman);
int check_ratio = std::min<int>(std::max<int>(args.GetIntArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
bool fLoaded = false;
while (!fLoaded && !ShutdownRequested()) {
for (bool fLoaded = false; !fLoaded && !ShutdownRequested();) {
node.mempool = std::make_unique<CTxMemPool>(node.fee_estimator.get(), check_ratio);
node.chainman = std::make_unique<ChainstateManager>();