pub fn check_shard_segments<'a, BCI, Iter>(
chain_info: &BCI,
block_number: BlockNumber,
parent_block_root: &BlockRoot,
shard_segments: Iter,
block_confirmation_depth: BlockNumber,
shard_confirmation_depth: BlockNumber,
) -> Result<(), CheckShardSegmentsError>where
BCI: CheckShardSegmentsChainInfo,
Iter: IntoIterator<Item = (ShardIndex, OwnSegments<'a>)>,Expand description
Check shard segments listed in a block with a specified number and parent.
Shard segments of a base block that survive its shard confirmation window (see
ConsensusConstants::shard_confirmation_depth) are confirmed and will be included in a super
segment, a shard can’t reorg them anymore. Such a segment listed again would be included in
super segments twice. Local segment indices of each shard must also continue its most recent
listing without gaps. The first [OwnSegments] of a shard in the block may start below that
to list segments again after a shard reorg, later ones must continue the previous one. Shard
segments of base blocks whose super segments are not persisted yet are read through the
ancestry of parent_block_root, see ConsensusConstants::block_confirmation_depth.
shard_segments are segments of intermediate and leaf shards listed in the block.