Shell/mempool_peer_worker: improve docstrings
This commit is contained in:
parent
35bccd05b1
commit
903f56d5c9
@ -35,29 +35,31 @@ module type T = sig
|
|||||||
module Mempool_worker: Mempool_worker.T
|
module Mempool_worker: Mempool_worker.T
|
||||||
|
|
||||||
(** The type of a peer worker. Each peer worker should be used for treating
|
(** The type of a peer worker. Each peer worker should be used for treating
|
||||||
* all the operations from a given peer. *)
|
all the operations from a given peer. *)
|
||||||
type t
|
type t
|
||||||
|
|
||||||
(** Types for calls into this module *)
|
(** Types for calls into this module *)
|
||||||
|
|
||||||
(** [input] are the batches of operations that are given to a peer worker to
|
(** [input] are the batches of operations that are given to a peer worker to
|
||||||
* validate. These hashes are gossiped on the network, and the mempool checks
|
validate. These hashes are gossiped on the network, and the mempool checks
|
||||||
* their validity before gossiping them furhter. *)
|
their validity before gossiping them furhter. *)
|
||||||
type input = Operation_hash.t list
|
type input = Operation_hash.t list
|
||||||
|
|
||||||
(** [create limits peer_id mempool_worker] creates a peer worker meant
|
(** [create limits peer_id mempool_worker] creates a peer worker meant
|
||||||
* to be used for validating batches of operations sent by the peer [peer_id].
|
to be used for validating batches of operations sent by the peer
|
||||||
* The validation of each operations is delegated to the associated [mempool_worker]. *)
|
[peer_id]. The validation of each operations is delegated to the
|
||||||
|
associated [mempool_worker]. *)
|
||||||
val create: limits -> P2p_peer.Id.t -> Mempool_worker.t -> t Lwt.t
|
val create: limits -> P2p_peer.Id.t -> Mempool_worker.t -> t Lwt.t
|
||||||
|
|
||||||
(** [shutdown t] closes the peer worker [t]. It returns a list of operation
|
(** [shutdown t] closes the peer worker [t]. It returns a list of operation
|
||||||
* hashes that can be recycled when a new worker is created for the same peer.
|
hashes that can be recycled when a new worker is created for the same peer.
|
||||||
* *)
|
*)
|
||||||
val shutdown: t -> input Lwt.t
|
val shutdown: t -> input Lwt.t
|
||||||
|
|
||||||
(** [validate mempool_worker worker input] validates the batch of operations
|
(** [validate worker input] validates the batch of operations [input]. The
|
||||||
* [input]. The work is performed by [worker] and the underlying validation of
|
work is performed by [worker] and the underlying validation of each
|
||||||
* each operation is performed by [mempool_worker]. *)
|
operation is performed by the [mempool_worker] that was used to [create]
|
||||||
|
[worker]. *)
|
||||||
val validate: t -> input -> unit tzresult Lwt.t
|
val validate: t -> input -> unit tzresult Lwt.t
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user