Skip to content

Commit

Permalink
chore: rm some unused types (#9667)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jul 20, 2024
1 parent 2133e93 commit ab861bd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
2 changes: 1 addition & 1 deletion crates/engine/tree/src/backfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 0 additions & 30 deletions crates/engine/tree/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
}
}

0 comments on commit ab861bd

Please sign in to comment.