File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1619,7 +1619,17 @@ impl<P: Preset> Network<P> {
16191619 let ( local_finalized_root_at_remote_finalized_epoch, sync_status) =
16201620 match local. finalized_epoch . cmp ( & remote. finalized_epoch ) {
16211621 Ordering :: Less => ( None , SyncStatus :: Advanced { info } ) ,
1622- Ordering :: Equal => ( Some ( local. finalized_root ) , SyncStatus :: Synced { info } ) ,
1622+ Ordering :: Equal => {
1623+ let max_empty_slots = self . controller . store_config ( ) . max_empty_slots ;
1624+
1625+ let status = if remote. head_slot + max_empty_slots < local. head_slot {
1626+ SyncStatus :: Behind { info }
1627+ } else {
1628+ SyncStatus :: Synced { info }
1629+ } ;
1630+
1631+ ( Some ( local. finalized_root ) , status)
1632+ }
16231633 Ordering :: Greater => {
16241634 let remote_finalized_slot = Self :: start_of_epoch ( remote. finalized_epoch ) ;
16251635
You can’t perform that action at this time.
0 commit comments