Main.Mempool
type conflict_handler =
existing_operation:
(Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t * operation) ->
new_operation:
(Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t * operation) ->
[ `Keep | `Replace ]
type operation_conflict =
| Operation_conflict of {
existing : Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t;
new_operation : Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t;
}
type add_error =
| Validation_error of Mavryk_protocol_environment_001_PtAtLas.Error_monad.error
Mavryk_protocol_environment_001_PtAtLas.Error_monad.trace
| Add_conflict of operation_conflict
val init :
Mavryk_protocol_environment_001_PtAtLas.Context.t ->
Mavryk_protocol_environment_001_PtAtLas.Chain_id.t ->
head_hash:Mavryk_protocol_environment_001_PtAtLas.Block_hash.t ->
head:Mavryk_protocol_environment_001_PtAtLas.Block_header.shell_header ->
(validation_info * t)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val encoding : t Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val add_operation :
?check_signature:bool ->
?conflict_handler:conflict_handler ->
validation_info ->
t ->
(Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t * operation) ->
(t * add_result, add_error)
Mavryk_protocol_environment_001_PtAtLas.Pervasives.result
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val remove_operation :
t ->
Mavryk_protocol_environment_001_PtAtLas.Operation_hash.t ->
t
val merge :
?conflict_handler:conflict_handler ->
t ->
t ->
(t, merge_error) Mavryk_protocol_environment_001_PtAtLas.Pervasives.result
val operations :
t ->
operation Mavryk_protocol_environment_001_PtAtLas.Operation_hash.Map.t