mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 16:18:08 -05:00
chore: rm some unused types (#9667)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user