Module Processor.Block

type t = {
state_hash : string;
parent_id : int option;
parent_hash : string;
creator_id : int;
block_winner_id : int;
snarked_ledger_hash_id : int;
staking_epoch_data_id : int;
next_epoch_data_id : int;
min_window_density : int64;
total_currency : string;
ledger_hash : string;
height : int64;
global_slot_since_hard_fork : int64;
global_slot_since_genesis : int64;
timestamp : string;
chain_status : string;
}
val to_hlist : t -> ( unit, string -> int option -> string -> int -> int -> int -> int -> int -> int64 -> string -> string -> int64 -> int64 -> int64 -> string -> string -> unit ) H_list.t
val of_hlist : ( unit, string -> int option -> string -> int -> int -> int -> int -> int -> int64 -> string -> string -> int64 -> int64 -> int64 -> string -> string -> unit ) H_list.t -> t
val chain_status : t -> string
val timestamp : t -> string
val global_slot_since_genesis : t -> int64
val global_slot_since_hard_fork : t -> int64
val height : t -> int64
val ledger_hash : t -> string
val total_currency : t -> string
val min_window_density : t -> int64
val next_epoch_data_id : t -> int
val staking_epoch_data_id : t -> int
val snarked_ledger_hash_id : t -> int
val block_winner_id : t -> int
val creator_id : t -> int
val parent_hash : t -> string
val parent_id : t -> int option
val state_hash : t -> string
module Fields : sig ... end
val typ : t Caqti_type.t
val table_name : string
val make_finder : ( 'a -> string -> 'b ) -> ( string Caqti_type.t -> int Caqti_type.t -> string -> 'c ) -> state_hash:Mina_base.State_hash.t -> 'd
val find : (module Caqti_async.CONNECTION) -> state_hash:Mina_base.State_hash.t -> ( int, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val find_opt : (module Caqti_async.CONNECTION) -> state_hash:Mina_base.State_hash.t -> ( int option, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val load : (module Caqti_async.CONNECTION) -> id:int -> ( t, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val add_parts_if_doesn't_exist : (module Caqti_async.CONNECTION) -> constraint_constants:Genesis_constants.Constraint_constants.t -> protocol_state: ( Mina_base.State_hash.t, ( 'a, ( Mina_base.Staged_ledger_hash.t, Mina_base.Frozen_ledger_hash.t, 'b, Block_time.t, 'c ) Mina_state.Blockchain_state.Poly.t, Consensus.Data.Consensus_state.Value.t, 'd ) Mina_state.Protocol_state.Body.t ) Mina_state.Protocol_state.Poly.t -> staged_ledger_diff:Staged_ledger_diff.t -> hash:Mina_base.State_hash.t -> ( int, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t
val add_if_doesn't_exist : (module Caqti_async.CONNECTION) -> constraint_constants:Genesis_constants.Constraint_constants.t -> Mina_block.t Mina_base.State_hash.With_state_hashes.t -> ( int, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t
val add_from_precomputed : (module Caqti_async.CONNECTION) -> constraint_constants:Genesis_constants.Constraint_constants.t -> Mina_block.Precomputed.t -> ( int, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t
val add_from_extensional : (module Caqti_async.CONNECTION) -> Extensional.Block.t -> ( int, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t
val set_parent_id_if_null : (module Caqti_async.CONNECTION) -> parent_hash:Mina_base.State_hash.t -> parent_id:int -> ( unit, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val get_subchain : (module Caqti_async.CONNECTION) -> start_block_id:int -> end_block_id:int -> ( t list, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val get_highest_canonical_block_opt : (module Caqti_async.CONNECTION) -> unit -> ( (int * int64) option, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val get_nearest_canonical_block_above : (module Caqti_async.CONNECTION) -> int64 -> ( int * int64, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val get_nearest_canonical_block_below : (module Caqti_async.CONNECTION) -> int64 -> ( int * int64, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val mark_as_canonical : (module Caqti_async.CONNECTION) -> state_hash:string -> ( unit, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val mark_as_orphaned : (module Caqti_async.CONNECTION) -> state_hash:string -> height:int64 -> ( unit, [> Caqti_error.call_or_retrieve ] ) Stdlib.result Async_kernel.Deferred.t
val update_chain_status : (module Caqti_async.CONNECTION) -> block_id:int -> ( unit, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t
val delete_if_older_than : ?height:Core_kernel__Int.t -> ?num_blocks:int -> ?timestamp:Core.Int64.t -> (module Caqti_async.CONNECTION) -> ( unit, [> Caqti_error.call_or_retrieve ] ) Async_kernel__Deferred_result.t