Skip to content

Commit e04be37

Browse files
l0rincTheCharlatanMarcoFalke
committed
init,log: Unify block index and chainstate loading log line
Example logs before the change: ``` 2025-01-07T11:58:33Z Verification progress: 99% 2025-01-07T11:58:33Z Verification: No coin database inconsistencies in last 6 blocks (18905 transactions) 2025-01-07T11:58:33Z block index 31892ms 2025-01-07T11:58:33Z Setting NODE_NETWORK on non-prune mode 2025-01-07T11:58:33Z block tree size = 878086 2025-01-07T11:58:33Z nBestHeight = 878085 ``` Removed redundant duration as well since it can be recovered from the timestamps. Co-authored-by: TheCharlatan <[email protected]> Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^[email protected]>
1 parent 433412f commit e04be37

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
@@ -1245,7 +1245,6 @@ static ChainstateLoadResult InitAndLoadChainstate(
12451245
"", CClientUIInterface::MSG_ERROR);
12461246
};
12471247
uiInterface.InitMessage(_("Loading block index…").translated);
1248-
const auto load_block_index_start_time{SteadyClock::now()};
12491248
auto catch_exceptions = [](auto&& f) {
12501249
try {
12511250
return f();
@@ -1263,7 +1262,7 @@ static ChainstateLoadResult InitAndLoadChainstate(
12631262
}
12641263
std::tie(status, error) = catch_exceptions([&] { return VerifyLoadedChainstate(chainman, options); });
12651264
if (status == node::ChainstateLoadStatus::SUCCESS) {
1266-
LogPrintf(" block index %15dms\n", Ticks<std::chrono::milliseconds>(SteadyClock::now() - load_block_index_start_time));
1265+
LogInfo("Block index and chainstate loaded");
12671266
}
12681267
}
12691268
return {status, error};

0 commit comments

Comments
 (0)