diff --git a/crates/engine/tree/src/backfill.rs b/crates/engine/tree/src/backfill.rs index f575bff812..afe39e795d 100644 --- a/crates/engine/tree/src/backfill.rs +++ b/crates/engine/tree/src/backfill.rs @@ -168,7 +168,7 @@ where } // make sure we poll the pipeline if it's active, and return any ready pipeline events - if !self.is_pipeline_idle() { + if self.is_pipeline_active() { // advance the pipeline if let Poll::Ready(event) = self.poll_pipeline(cx) { return Poll::Ready(event) diff --git a/crates/engine/tree/src/chain.rs b/crates/engine/tree/src/chain.rs index 4ac015d23a..a778575c62 100644 --- a/crates/engine/tree/src/chain.rs +++ b/crates/engine/tree/src/chain.rs @@ -147,14 +147,6 @@ where } } -/// Represents the sync mode the chain is operating in. -#[derive(Debug, Default)] -enum SyncMode { - #[default] - Handler, - Backfill, -} - /// Event emitted by the [`ChainOrchestrator`] /// /// These are meant to be used for observability and debugging purposes. @@ -201,25 +193,3 @@ pub enum FromOrchestrator { /// Invoked when backfill sync started BackfillSyncStarted, } - -/// Represents the state of the chain. -#[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] -pub enum OrchestratorState { - /// Orchestrator has exclusive write access to the database. - BackfillSyncActive, - /// Node is actively processing the chain. - #[default] - Idle, -} - -impl OrchestratorState { - /// Returns `true` if the state is [`OrchestratorState::BackfillSyncActive`]. - pub const fn is_backfill_sync_active(&self) -> bool { - matches!(self, Self::BackfillSyncActive) - } - - /// Returns `true` if the state is [`OrchestratorState::Idle`]. - pub const fn is_idle(&self) -> bool { - matches!(self, Self::Idle) - } -}