diff --git a/sync/src/tasks/block_sync_task.rs b/sync/src/tasks/block_sync_task.rs index fc6e3146d2..33fbd32f6d 100644 --- a/sync/src/tasks/block_sync_task.rs +++ b/sync/src/tasks/block_sync_task.rs @@ -472,7 +472,7 @@ where self.find_absent_ancestor(vec![block_header.clone()]) .await?; - if block_header.number() % 10000 == 0 + if block_header.number() % 1000 == 0 || block_header.number() >= self.target.target_id.number() { if self.sync_dag_store.get_dag_sync_block(block_header.number(), block_header.id()).is_err() { diff --git a/sync/src/tasks/mod.rs b/sync/src/tasks/mod.rs index a15bd68c79..48abe6d18d 100644 --- a/sync/src/tasks/mod.rs +++ b/sync/src/tasks/mod.rs @@ -118,7 +118,7 @@ pub trait SyncFetcher: PeerOperator + BlockIdFetcher + BlockFetcher + BlockInfoF match target.as_ref() { None => { let maybe_target_number = std::cmp::min( - begin_number.saturating_add(10000), + begin_number.saturating_add(1000), better_peer.block_number(), ); if maybe_target_number == better_peer.block_number()