chore: rm some unused types (#9667)

This commit is contained in:
Matthias Seitz
2024-07-20 11:36:35 +02:00
committed by GitHub
parent 2133e93921
commit ab861bd10e
2 changed files with 1 additions and 31 deletions

View File

@@ -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)

View File

@@ -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)
}
}