Functional storage using Merkle Patricia tree
Module type
Class type
Library plebeia
Module Plebeia . Commit

3 Version control

type t = {
parent : Commit_hash.t option;
index : Index.t;(*

Index of the Plebeia tree root node in storage_context.

If the commit is a dummy, field index is set to

hash : Commit_hash.t;(*

Context hash

info : Index.t;(*

Index of the Info.t in storage_conetxt.

val is_genesis : t -> bool

Returns true if the entry is a genesis: no parent

val pp : Stdlib.Format.formatter -> t -> unit
val compare : t -> t -> int

Comparison by index field

val compute_hash : (module Plebeia__Hashfunc_intf.S) -> parent:Commit_hash.t option -> Hash.Prefix.t -> Commit_hash.t

Hash computation for a new commit entry

val make : (module Plebeia__Hashfunc_intf.S) -> parent:Commit_hash.t option -> index:Index.t -> info:Index.t -> ?hash_override:Commit_hash.t -> Hash.Prefix.t -> t

Make a new commit entry.

If hash_override is set, hash of the new entry is overridden by it, instead of computing from parent and the given Hash.Prefix.t.