MCPcopy Create free account
hub / github.com/SeismicSystems/summit / get_finalized_checkpoint

Method get_finalized_checkpoint

finalizer/src/db.rs:249–259  ·  view source on GitHub ↗
(&self, epoch: u64)

Source from the content-addressed store, hash-verified

247 return Err(self.handle_db_error(e, "store_finalized_checkpoint"));
248 }
249
250 // Update the latest checkpoint epoch tracker
251 let current_latest = self.get_latest_checkpoint_epoch().await;
252 if epoch >= current_latest {
253 self.set_latest_checkpoint_epoch(epoch).await?;
254 }
255 Ok(())
256 }
257
258 #[allow(unused)]
259 pub async fn get_finalized_checkpoint(&self, epoch: u64) -> Option<(Checkpoint, Block)> {
260 let key = Self::make_checkpoint_key(epoch);
261 match self.store.get(&key).await {
262 Ok(Some(Value::Checkpoint(checkpoint))) => Some(*checkpoint),

Calls 2

getMethod · 0.80
handle_db_errorMethod · 0.80