Skip to main content

trigger_fetch_for_parent

Function trigger_fetch_for_parent 

Source
pub(super) fn trigger_fetch_for_parent<Types, S, P>(
    fetcher: &Arc<Fetcher<Types, S, P>>,
    leaf: &LeafQueryData<Types>,
)
where Types: NodeType, Header<Types>: QueryableHeader<Types>, Payload<Types>: QueryablePayload<Types>, S: VersionedDataSource + 'static, for<'a> S::Transaction<'a>: UpdateAvailabilityStorage<Types>, for<'a> S::ReadOnly<'a>: AvailabilityStorage<Types> + NodeStorage<Types> + PrunedHeightStorage, P: AvailabilityProvider<Types>,
Expand description

Trigger a fetch of the parent of the given leaf, if it is missing.

This ensures that a passive fetch for a leaf will always resolve eventually, even if we miss the decide event for that leaf: we will eventually get a decide for a later leaf, and then fetch the chain backwards.