Skip to content

Commit

Permalink
short circuit proposed_head == current_head case
Browse files Browse the repository at this point in the history
  • Loading branch information
hanabi1224 committed May 7, 2024
1 parent 23366b9 commit 2aff1ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/chain_sync/tipset_syncer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,10 @@ async fn sync_tipset_range<DB: Blockstore + Sync + Send + 'static>(
bad_block_cache: Arc<BadBlockCache>,
genesis: Arc<Tipset>,
) -> Result<(), TipsetRangeSyncerError> {
if proposed_head == current_head {
return Ok(());
}

tracker
.write()
.init(current_head.clone(), proposed_head.clone());
Expand Down

0 comments on commit 2aff1ce

Please sign in to comment.