From 246ba36a8948cff3f9156287b5629eb55136d2be Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 11 Dec 2025 23:11:59 +0100 Subject: [PATCH] WIP --- src/lib_dal_node/store.ml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/lib_dal_node/store.ml b/src/lib_dal_node/store.ml index f633af84c031..b58030f68c7b 100644 --- a/src/lib_dal_node/store.ml +++ b/src/lib_dal_node/store.ml @@ -998,6 +998,23 @@ let add_slot_headers ~number_of_slots ~block_level slot_headers t = Statuses_cache.add_status statuses_cache `Waiting_attestation slot_id in Slot_id_cache.add ~number_of_slots t.finalized_commitments slot_header ; + let slot_opt = + Commitment_indexed_cache.find_opt + t.not_yet_published_cache + slot_header.commitment + in + let* _ = + (* Ignoring Errors, this is a temporary storage meant to prevent data + loss in case of shutdown of producer's dal node *) + match slot_opt with + | Some (bytes, shares, share_proofs) -> + Slots.add_slot + t.slots + ~slot_size:(Bytes.length bytes) + bytes + slot_id + | None -> Lwt.return (Ok ()) + in return (SI.add slot_index waiting)) SI.empty slot_headers -- GitLab