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

Method put_notarization

syncer/src/cache.rs:273–287  ·  view source on GitHub ↗

Add a notarization to the prunable archive.

(
        &mut self,
        round: Round,
        commitment: B::Digest,
        notarization: Notarization<S, B::Digest>,
    )

Source from the content-addressed store, hash-verified

271 archive
272 }
273
274 /// Add a verified block to the prunable archive and start syncing it.
275 pub(crate) async fn put_verified(
276 &mut self,
277 round: Round,
278 commitment: B::Digest,
279 block: B,
280 ) -> Handle<()> {
281 let Some(cache) = self.get_or_init_epoch(round.epoch()).await else {
282 return Handle::ready(Ok(()));
283 };
284 let view = round.view().get();
285 match cache.verified_blocks.has_at(view, &commitment).await {
286 Ok(true) => {
287 return Self::handle_start_result(
288 cache.verified_blocks.start_sync().await,
289 round,
290 "verified",

Callers 1

verify_deliveredMethod · 0.80

Calls 4

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

Tested by

no test coverage detected