mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 09:08:05 -05:00
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
18 lines
530 B
Rust
18 lines
530 B
Rust
use alloy_eips::BlockNumHash;
|
|
use alloy_primitives::{BlockNumber, B256};
|
|
|
|
/// Current status of the blockchain's head.
|
|
#[derive(Default, Copy, Clone, Debug, Eq, PartialEq)]
|
|
pub struct ChainInfo {
|
|
/// The block hash of the highest fully synced block.
|
|
pub best_hash: B256,
|
|
/// The block number of the highest fully synced block.
|
|
pub best_number: BlockNumber,
|
|
}
|
|
|
|
impl From<ChainInfo> for BlockNumHash {
|
|
fn from(value: ChainInfo) -> Self {
|
|
Self { number: value.best_number, hash: value.best_hash }
|
|
}
|
|
}
|