Skip to main content

anchor_for_parent_with_frontiers

Function anchor_for_parent_with_frontiers 

Source
pub fn anchor_for_parent_with_frontiers<N, Provider>(
    parent_hash: B256,
    in_mem_chain: impl Iterator<Item = ExecutedBlock<N>>,
    partial_state_trie: BlockNumHash,
    finish: BlockNumHash,
    provider: &Provider,
) -> ProviderResult<AnchorForParent<N>>
where N: NodePrimitives, Provider: BlockNumReader + PruneCheckpointReader,
Expand description

Returns the anchor block to use for the target parent and a chain of in-memory blocks using known durable frontiers.

ยงArguments

  • parent: The block whose post-state is being targeted.
  • in_mem_chain: Yields the in-memory blocks in the chain, starting at parent_hash.
  • partial_state_trie: The durable state/trie frontier.
  • finish: The durable Finish frontier.
  • provider: Used to resolve the parent and check changeset availability.