Add a notarization to the prunable archive.
(
&mut self,
round: Round,
commitment: B::Digest,
notarization: Notarization<S, B::Digest>,
)
| 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", |
no test coverage detected