Skip to content

Commit

Permalink
GH-2102 Fix log_applied to not be called during replay
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Apr 6, 2024
1 parent 9de11ff commit 8e98c18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3342,6 +3342,8 @@ struct controller_impl {

template<typename BSP>
void log_applied(controller::block_report& br, const BSP& bsp) const {
if (replaying) // fork_db_root_block_num not available during replay
return;
fc::time_point now = fc::time_point::now();
if (now - bsp->timestamp() < fc::minutes(5) || (bsp->block_num() % 1000 == 0)) {
ilog("Received block ${id}... #${n} @ ${t} signed by ${p} " // "Received" instead of "Applied" so it matches existing log output
Expand Down

0 comments on commit 8e98c18

Please sign in to comment.