Skip to content

Commit fe96a2e

Browse files
committed
style-only: Use for instead of when loading Chainstate
It's a bit clearer and restricts the scope of fLoaded
1 parent 5921b86 commit fe96a2e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/init.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
14201420
assert(!node.chainman);
14211421
int check_ratio = std::min<int>(std::max<int>(args.GetIntArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000);
14221422

1423-
bool fLoaded = false;
1424-
while (!fLoaded && !ShutdownRequested()) {
1423+
for (bool fLoaded = false; !fLoaded && !ShutdownRequested();) {
14251424
node.mempool = std::make_unique<CTxMemPool>(node.fee_estimator.get(), check_ratio);
14261425

14271426
node.chainman = std::make_unique<ChainstateManager>();

0 commit comments

Comments
 (0)