From 22d3994b07943637a7d07048803fd795c2ddff1d Mon Sep 17 00:00:00 2001 From: Bruno Deferrari Date: Thu, 28 Mar 2024 08:42:57 -0300 Subject: [PATCH] fix(transition-frontier): Add the best tip at the end of the pending blocks chain with `FetchSuccess` state --- node/src/logger/logger_effects.rs | 2 +- .../sync/transition_frontier_sync_reducer.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/node/src/logger/logger_effects.rs b/node/src/logger/logger_effects.rs index 15d93b510..ae993de2b 100644 --- a/node/src/logger/logger_effects.rs +++ b/node/src/logger/logger_effects.rs @@ -1213,7 +1213,7 @@ pub fn logger_effects(store: &Store, action: ActionWithMetaRef<'_ kind = kind.to_string(), summary = "Transition frontier root ledger sync success".to_string(), ), - _other => openmina_core::log::debug!( + _other => openmina_core::log::info!( meta.time(); node_id = node_id, kind = kind.to_string(), diff --git a/node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs b/node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs index f6a68447a..7a51e1dbc 100644 --- a/node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs +++ b/node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs @@ -424,6 +424,11 @@ impl TransitionFrontierSyncState { } })); + chain.push(TransitionFrontierSyncBlockState::FetchSuccess { + time: meta.time(), + block: best_tip, + }); + *self = Self::BlocksPending { time: meta.time(), chain,