Masking_merkle_tree.Makemodule Inputs : Inputs_intf.Stype account = Inputs.Account.ttype hash = Inputs.Hash.ttype account_id = Inputs.Account_id.ttype account_id_set = Inputs.Account_id.Set.ttype location = Inputs.Location.tmodule Location = Inputs.Locationmodule Addr = Location.Addrmodule Parent : sig ... endInvariant is that parent is None in unattached mask and `Some` in the attached one. We can capture this with a GADT but there's some annoying issues with bin_io to do so
module Detached_parent_signal : sig ... endtype t = {uuid : Uuid.Stable.V1.t; |
account_tbl : Inputs.Account.t Inputs.Location_binable.Table.t; |
token_owners : Inputs.Account_id.t Inputs.Token_id.Table.t; |
mutable parent : Parent.t; |
detached_parent_signal : Detached_parent_signal.t; |
hash_tbl : Inputs.Hash.t Addr.Table.t; |
location_tbl : Location.t Inputs.Account_id.Table.t; |
mutable current_location : Location.t option; |
depth : int; |
}val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> tval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.ttype unattached = tval unattached_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> unattachedval sexp_of_unattached : unattached -> Ppx_sexp_conv_lib.Sexp.tval create : depth:int -> unit -> tval get_uuid : t -> Uuid.Stable.V1.tval depth : t -> intval with_ledger : f:( ( depth:int -> t ) -> 'a ) -> 'bmodule Attached : sig ... endval set_parent : t -> Inputs.Base.t -> tval addr_to_location : Location.Addr.t -> Location.t