Get a finalization from the prunable archive by commitment.
(
&self,
commitment: B::Digest,
)
| 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> { |
no test coverage detected