Skip to main content

derive_super_segment_for_block

Function derive_super_segment_for_block 

Source
pub fn derive_super_segment_for_block<BCI>(
    chain_info: &BCI,
    parent_block_number: BlockNumber,
    parent_block_root: &BlockRoot,
    block_confirmation_depth: BlockNumber,
    shard_confirmation_depth: BlockNumber,
) -> Result<Option<SuperSegment>, DeriveSuperSegmentForBlockError>
Expand description

Derive a super segment for a block with a specified parent block number and root.

For block n shard segment roots of blocks n - block_confirmation_depth - shard_confirmation_depth ..= n - block_confirmation_depth on its chain are read (see ConsensusConstants::block_confirmation_depth and ConsensusConstants::shard_confirmation_depth).