From fe96a2e4bd87768df8001eb4117926a0977d876e Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 22 Feb 2022 14:20:55 -0500 Subject: [PATCH] style-only: Use for instead of when loading Chainstate It's a bit clearer and restricts the scope of fLoaded --- src/init.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 11d2b61da87..6ea25bc36db 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1420,8 +1420,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) assert(!node.chainman); int check_ratio = std::min(std::max(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(node.fee_estimator.get(), check_ratio); node.chainman = std::make_unique();