reth_downloaders/headers/
test_utils.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
//! Test helper impls for generating bodies

#![allow(dead_code)]

use reth_primitives::SealedHeader;

/// Returns a new [`SealedHeader`] that's the child header of the given `parent`.
pub(crate) fn child_header(parent: &SealedHeader) -> SealedHeader {
    let mut child = parent.as_ref().clone();
    child.number += 1;
    child.parent_hash = parent.hash_slow();
    SealedHeader::seal(child)
}