Module Mina_net2.Validation_callback

type validation_result = [
| `Accept
| `Reject
| `Ignore
]
val equal_validation_result : validation_result -> validation_result -> bool
type t
val create : Core.Time_ns.t -> t
val create_without_expiration : unit -> t
val is_expired : t -> bool
val await : t -> validation_result option Async.Deferred.t
val await_exn : t -> validation_result Async.Deferred.t
val await_timeout : t -> unit Async.Deferred.t

May return a deferred that never resolves, in the case of callbacks without expiration.

val fire_if_not_already_fired : t -> validation_result -> unit
val set_message_type : t -> [ `Unknown | `Block | `Snark_work | `Transaction ] -> unit