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

Method put_finalization

syncer/src/cache.rs:290–304  ·  view source on GitHub ↗

Add a finalization to the prunable archive.

(
        &mut self,
        round: Round,
        commitment: B::Digest,
        finalization: Finalization<S, B::Digest>,
    )

Source from the content-addressed store, hash-verified

288
289 /// Add a finalization to the prunable archive.
290 pub(crate) async fn put_finalization(
291 &mut self,
292 round: Round,
293 commitment: B::Digest,
294 finalization: Finalization<S, B::Digest>,
295 ) {
296 let Some(cache) = self.get_or_init_epoch(round.epoch()).await else {
297 return;
298 };
299 let result = cache
300 .finalizations
301 .put_sync(round.view().get(), commitment, finalization)
302 .await;
303 Self::handle_result(result, round, "finalization");
304 }
305
306 /// Helper to debug cache results.
307 fn handle_result(result: Result<(), archive::Error>, round: Round, name: &str) {

Callers

nothing calls this directly

Calls 4

get_or_init_epochMethod · 0.80
epochMethod · 0.80
getMethod · 0.80
viewMethod · 0.80

Tested by

no test coverage detected