reth_chainspec/
info.rs

1use alloy_eips::BlockNumHash;
2use alloy_primitives::{BlockNumber, B256};
3
4/// Current status of the blockchain's head.
5#[derive(Default, Copy, Clone, Debug, Eq, PartialEq)]
6pub struct ChainInfo {
7    /// The block hash of the highest fully synced block.
8    pub best_hash: B256,
9    /// The block number of the highest fully synced block.
10    pub best_number: BlockNumber,
11}
12
13impl From<ChainInfo> for BlockNumHash {
14    fn from(value: ChainInfo) -> Self {
15        Self { number: value.best_number, hash: value.best_hash }
16    }
17}