mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(reth-execution-types): make generic DisplayBlocksChain (#13336)
This commit is contained in:
@ -374,9 +374,11 @@ impl<N: NodePrimitives> Chain<N> {
|
||||
|
||||
/// Wrapper type for `blocks` display in `Chain`
|
||||
#[derive(Debug)]
|
||||
pub struct DisplayBlocksChain<'a>(pub &'a BTreeMap<BlockNumber, SealedBlockWithSenders>);
|
||||
pub struct DisplayBlocksChain<'a, B: reth_primitives_traits::Block>(
|
||||
pub &'a BTreeMap<BlockNumber, SealedBlockWithSenders<B>>,
|
||||
);
|
||||
|
||||
impl fmt::Display for DisplayBlocksChain<'_> {
|
||||
impl<B: reth_primitives_traits::Block> 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());
|
||||
|
||||
Reference in New Issue
Block a user