diff --git a/crates/katana/pipeline/src/stage/sequencing.rs b/crates/katana/pipeline/src/stage/sequencing.rs index 50b199caf7..c1998e7341 100644 --- a/crates/katana/pipeline/src/stage/sequencing.rs +++ b/crates/katana/pipeline/src/stage/sequencing.rs @@ -12,7 +12,7 @@ use katana_pool::{TransactionPool, TxPool}; use katana_tasks::{TaskHandle, TaskSpawner}; use tracing::error; -pub type SequencingFut = BoxFuture<'static, ()>; +pub type SequencingFut = BoxFuture<'static, Result<()>>; /// The sequencing stage is responsible for advancing the chain state. #[allow(missing_debug_implementations)] @@ -62,13 +62,13 @@ impl Sequencing { } impl IntoFuture for Sequencing { - type Output = (); + type Output = Result<()>; type IntoFuture = SequencingFut; fn into_future(self) -> Self::IntoFuture { Box::pin(async move { // Build the messaging and block production tasks. - let messaging = self.run_messaging().await.unwrap(); + let messaging = self.run_messaging().await?; let block_production = self.run_block_production(); // Neither of these tasks should complete as they are meant to be run forever, @@ -83,6 +83,8 @@ impl IntoFuture for Sequencing { error!(target: "sequencing", reason = ?res, "Block production task finished unexpectedly."); } } + + Ok(()) }) } }