Add a finalization to the prunable archive.
(
&mut self,
round: Round,
commitment: B::Digest,
finalization: Finalization<S, B::Digest>,
)
| 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) { |
nothing calls this directly
no test coverage detected