diff --git a/common/src/state.rs b/common/src/state.rs index 0489570..b273b87 100644 --- a/common/src/state.rs +++ b/common/src/state.rs @@ -1,5 +1,5 @@ use lb_core::mantle::ops::channel::MsgId; -use lb_zone_sdk::{sequencer::SequencerCheckpoint, state::InscriptionInfo}; +use lb_zone_sdk::state::InscriptionInfo; use crate::message::Msg; @@ -31,9 +31,6 @@ pub trait ZoneState: Send { fn published(&self) -> &[Msg]; fn adopted(&self) -> &[Msg]; fn finalized(&self) -> &[Msg]; - - fn save_checkpoint(&mut self, checkpoint: SequencerCheckpoint); - fn load_checkpoint(&self) -> Option<&SequencerCheckpoint>; } /// In-memory implementation of [`ZoneState`]. @@ -42,7 +39,6 @@ pub struct InMemoryZoneState { published: Vec, adopted: Vec, finalized: Vec, - checkpoint: Option, } impl ZoneState for InMemoryZoneState { @@ -95,12 +91,4 @@ impl ZoneState for InMemoryZoneState { fn finalized(&self) -> &[Msg] { &self.finalized } - - fn save_checkpoint(&mut self, checkpoint: SequencerCheckpoint) { - self.checkpoint = Some(checkpoint); - } - - fn load_checkpoint(&self) -> Option<&SequencerCheckpoint> { - self.checkpoint.as_ref() - } } diff --git a/sequencer/src/sequencer.rs b/sequencer/src/sequencer.rs index 5341488..34532f5 100644 --- a/sequencer/src/sequencer.rs +++ b/sequencer/src/sequencer.rs @@ -163,7 +163,6 @@ async fn handle_event( debug!(msg_id = %hex::encode(info.this_msg.as_ref()), "Published"); state.on_published(&info); save_checkpoint(Path::new(checkpoint_path), &checkpoint); - state.save_checkpoint(checkpoint); } Event::FinalizedInscriptions { inscriptions } => { state.on_finalized(&inscriptions);