diff --git a/crates/engine/tree/src/chain.rs b/crates/engine/tree/src/chain.rs index fb34db6b1..9523e67ca 100644 --- a/crates/engine/tree/src/chain.rs +++ b/crates/engine/tree/src/chain.rs @@ -2,6 +2,7 @@ use crate::backfill::{BackfillAction, BackfillEvent, BackfillSync}; use futures::Stream; use reth_stages_api::{ControlFlow, PipelineTarget}; use std::{ + fmt::{Display, Formatter, Result}, pin::Pin, task::{Context, Poll}, }; @@ -166,6 +167,25 @@ pub enum ChainEvent { Handler(T), } +impl Display for ChainEvent { + fn fmt(&self, f: &mut Formatter<'_>) -> Result { + match self { + Self::BackfillSyncStarted => { + write!(f, "BackfillSyncStarted") + } + Self::BackfillSyncFinished => { + write!(f, "BackfillSyncFinished") + } + Self::FatalError => { + write!(f, "FatalError") + } + Self::Handler(event) => { + write!(f, "Handler({event})") + } + } + } +} + /// A trait that advances the chain by handling actions. /// /// This is intended to be implement the chain consensus logic, for example `engine` API.