diff --git a/chain/src/types.rs b/chain/src/types.rs index 03565fa38..fe88714e9 100644 --- a/chain/src/types.rs +++ b/chain/src/types.rs @@ -166,7 +166,15 @@ impl SyncState { /// Whether the current state matches any active syncing operation. /// Note: This includes our "initial" state. pub fn is_syncing(&self) -> bool { - *self.current.read() != SyncStatus::NoSync + match *self.current.read() { + SyncStatus::NoSync => false, + SyncStatus::BodySync { + archive_height: _, + current_height, + highest_height, + } => current_height + 10 < highest_height, + _ => false, + } } /// Current syncing status diff --git a/servers/src/mwc/sync/syncer.rs b/servers/src/mwc/sync/syncer.rs index 49bc8f9ab..a778789d4 100644 --- a/servers/src/mwc/sync/syncer.rs +++ b/servers/src/mwc/sync/syncer.rs @@ -141,7 +141,7 @@ impl SyncRunner { .set_boost_peers_capabilities(sync_reponse.peers_capabilities); } SyncRequestResponses::Syncing => { - debug_assert!(self.sync_state.is_syncing()); + //debug_assert!(self.sync_state.is_syncing()); self.peers .set_boost_peers_capabilities(sync_reponse.peers_capabilities); }