package plebeia

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Plebeia.CommitSource

3 Version control

3 Version control

Sourcetype t = {
  1. parent : Commit_hash.t option;
  2. index : Index.t;
    (*

    Index of the Plebeia tree root node in storage_context.

    If the commit is a dummy, field index is set to Index.zero.

    *)
  3. hash : Commit_hash.t;
    (*

    Context hash

    *)
  4. info : Index.t;
    (*

    Index of the Info.t in storage_conetxt.

    *)
}
Sourceval is_genesis : t -> bool

Returns true if the entry is a genesis: no parent

Sourceval pp : Format.formatter -> t -> unit
Sourceval compare : t -> t -> int

Comparison by index field

Sourceval 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

Sourceval 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.

OCaml

Innovation. Community. Security.