Function forest_filecoin::chain_sync::tipset_syncer::sync_tipset_range

source ยท
async fn sync_tipset_range<DB: Blockstore + Sync + Send + 'static>(
    proposed_head: Arc<Tipset>,
    current_head: Arc<Tipset>,
    tracker: Arc<RwLock<SyncState>>,
    state_manager: Arc<StateManager<DB>>,
    chain_store: Arc<ChainStore<DB>>,
    network: SyncNetworkContext<DB>,
    bad_block_cache: Arc<BadBlockCache>,
    genesis: Arc<Tipset>,
) -> Result<(), TipsetRangeSyncerError>
Expand description

Sync headers backwards from the proposed head to the current one, requesting missing tipsets from the network. Once headers are available, download messages going forward on the chain and validate each extension. Finally set the proposed head as the heaviest tipset.