From 92fae83c0d24c33a11320faad718bdc1f6389eda Mon Sep 17 00:00:00 2001 From: Tien Nguyen <116023870+htiennv@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:47:02 +0700 Subject: [PATCH] feat(reth-execution-types): make generic DisplayBlocksChain (#13336) --- crates/evm/execution-types/src/chain.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/evm/execution-types/src/chain.rs b/crates/evm/execution-types/src/chain.rs index f94e84b173..4df08987dd 100644 --- a/crates/evm/execution-types/src/chain.rs +++ b/crates/evm/execution-types/src/chain.rs @@ -374,9 +374,11 @@ impl Chain { /// Wrapper type for `blocks` display in `Chain` #[derive(Debug)] -pub struct DisplayBlocksChain<'a>(pub &'a BTreeMap); +pub struct DisplayBlocksChain<'a, B: reth_primitives_traits::Block>( + pub &'a BTreeMap>, +); -impl fmt::Display for DisplayBlocksChain<'_> { +impl fmt::Display for DisplayBlocksChain<'_, B> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut list = f.debug_list(); let mut values = self.0.values().map(|block| block.num_hash());