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

Method get_finalization_for

syncer/src/cache.rs:335–347  ·  view source on GitHub ↗

Get a finalization from the prunable archive by commitment.

(
        &self,
        commitment: B::Digest,
    )

Source from the content-addressed store, hash-verified

333
334 /// Get a finalization from the prunable archive by commitment.
335 pub(crate) async fn get_finalization_for(
336 &self,
337 commitment: B::Digest,
338 ) -> Option<Finalization<S, B::Digest>> {
339 for cache in self.caches.values().rev() {
340 match cache.finalizations.get(Identifier::Key(&commitment)).await {
341 Ok(Some(finalization)) => return Some(finalization),
342 Ok(None) => continue,
343 Err(e) => panic!("failed to get cached finalization: {e}"),
344 }
345 }
346 None
347 }
348
349 /// Looks for a block (verified or notarized).
350 pub(crate) async fn find_block(&self, commitment: B::Digest) -> Option<B> {

Callers 3

handle_deliverMethod · 0.80
verify_deliveredMethod · 0.80
try_repair_gapsMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected