Store.Statuses
A store keeping the attestation status of slot ids.
val update_selected_slot_headers_statuses :
block_level:int32 ->
attestation_lag:int ->
number_of_slots:int ->
(int -> bool) ->
t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
update_selected_slot_headers_statuses ~block_level
~attestation_lag ~number_of_slots attested is_attested store
updates the status of all accepted slots at level block_level -
attestation_lag
to either `Attested (attested
returns true
) or `Unattested (when attested
returns false
).
val get_slot_status :
slot_id:Tezos_dal_node_services.Types.slot_id ->
t ->
(Tezos_dal_node_services.Types.header_status,
[> Errors.other | Errors.not_found ])
Stdlib.result
Lwt.t
get_slot_status ~slot_id store
returns the status associated to the given accepted slot_id
, or None
if no status is associated to the slot_id
.
val remove_level_status :
level:int32 ->
t ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
remove_level_status ~level store
removes the status of all the slot ids published at the given level.