reth_testing_utils::generators

Function random_block_range

Source
pub fn random_block_range<R: Rng>(
    rng: &mut R,
    block_numbers: RangeInclusive<BlockNumber>,
    block_range_params: BlockRangeParams,
) -> Vec<SealedBlock>
Expand description

Generate a range of random blocks.

The parent hash of the first block in the result will be equal to head.

See random_block for considerations when validating the generated blocks.