Storage: added a dedicated store for predecessors under /block/
This commit is contained in:
parent
3be9928e54
commit
eaf2103967
@ -176,6 +176,14 @@ module Block = struct
|
||||
end
|
||||
end
|
||||
|
||||
module Predecessors =
|
||||
Store_helpers.Make_map
|
||||
(Store_helpers.Make_substore
|
||||
(Indexed_store.Store)
|
||||
(struct let name = ["predecessors"] end))
|
||||
(Store_helpers.Integer_index)
|
||||
(Store_helpers.Make_value(Block_hash))
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
@ -121,6 +121,16 @@ module Block : sig
|
||||
and type key = Block_hash.t
|
||||
and type value = invalid_block
|
||||
|
||||
(**
|
||||
Block predecessors under
|
||||
[/blocks/<block_id>/predecessors/<distance>/<block_id>].
|
||||
Used to compute block predecessors in [lib_node_shell/state.ml].
|
||||
*)
|
||||
module Predecessors : MAP_STORE
|
||||
with type t = store * Block_hash.t
|
||||
and type key = int
|
||||
and type value = Block_hash.t
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user