reth_downloaders/headers/test_utils.rs
1//! Test helper impls for generating bodies
2
3#![allow(dead_code)]
4
5use reth_primitives_traits::SealedHeader;
6
7/// Returns a new [`SealedHeader`] that's the child header of the given `parent`.
8pub(crate) fn child_header(parent: &SealedHeader) -> SealedHeader {
9 let mut child = parent.as_ref().clone();
10 child.number += 1;
11 child.parent_hash = parent.hash_slow();
12 SealedHeader::seal_slow(child)
13}