diff --git a/crates/transaction-pool/src/traits.rs b/crates/transaction-pool/src/traits.rs index 4811e9783d68..e01dc0946b4e 100644 --- a/crates/transaction-pool/src/traits.rs +++ b/crates/transaction-pool/src/traits.rs @@ -35,6 +35,7 @@ use std::{ sync::Arc, task::{Context, Poll}, }; +use std::hash::Hash; use tokio::sync::mpsc::Receiver; /// The `PeerId` type. @@ -717,9 +718,9 @@ pub enum PoolUpdateKind { /// /// This is used to update the pool state accordingly. #[derive(Clone, Debug)] -pub struct CanonicalStateUpdate<'a> { +pub struct CanonicalStateUpdate<'a, B = reth_primitives::Block> { /// Hash of the tip block. - pub new_tip: &'a SealedBlock, + pub new_tip: &'a B, /// EIP-1559 Base fee of the _next_ (pending) block /// /// The base fee of a block depends on the utilization of the last block and its base fee. @@ -742,11 +743,6 @@ impl CanonicalStateUpdate<'_> { self.new_tip.number } - /// Returns the hash of the tip block. - pub const fn hash(&self) -> B256 { - self.new_tip.hash() - } - /// Timestamp of the latest chain update pub fn timestamp(&self) -> u64 { self.new_tip.timestamp