async fn sync_headers_in_reverse<DB: Blockstore + Sync + Send + 'static>(
    tracker: Arc<RwLock<SyncState>>,
    proposed_head: Arc<Tipset>,
    current_head: &Tipset,
    bad_block_cache: &BadBlockCache,
    chain_store: &ChainStore<DB>,
    network: SyncNetworkContext<DB>,
) -> Result<NonEmpty<Arc<Tipset>>, TipsetRangeSyncerError>
Expand description

Download headers between the proposed head and the current one available locally. If they turn out to be on different forks, download more headers up to a certain limit to try to find a common ancestor.

Also checkout corresponding lotus code at https://github.com/filecoin-project/lotus/blob/v1.27.0/chain/sync.go#L684