Mempool: fix minor copyright and docstring strings

and change Work.work in Work.process_batch
This commit is contained in:
Pietro Abate 2018-12-13 09:03:43 +01:00 committed by MBourgoin
parent 7cbf457888
commit 35bccd05b1
No known key found for this signature in database
GPG Key ID: 4B3F7008ABB5B2D0
2 changed files with 5 additions and 5 deletions

View File

@ -100,7 +100,7 @@ module Make (Static: STATIC) (Mempool_worker: Mempool_worker.T)
(* 1. Core: the carefully scheduled work performed by the worker *)
module Work : sig
val work: Mempool_worker.t -> int -> input -> output Lwt.t
val process_batch: Mempool_worker.t -> int -> input -> output Lwt.t
end = struct
type t = {
pool: unit Lwt_pool.t;
@ -217,7 +217,7 @@ module Make (Static: STATIC) (Mempool_worker: Mempool_worker.T)
select pipeline >>= fun () ->
Lwt.return_unit
let work mempool_worker pool_size input =
let process_batch mempool_worker pool_size input =
let pipeline = create pool_size input in
let rec loop () =
if is_empty pipeline then
@ -342,7 +342,7 @@ module Make (Static: STATIC) (Mempool_worker: Mempool_worker.T)
= fun t (Request.Batch os) ->
let st = Worker.state t in
Worker.record_event t (Event.Start os) ;
Work.work st.mempool_worker st.pool_size os >>= fun r ->
Work.process_batch st.mempool_worker st.pool_size os >>= fun r ->
return r
let on_no_request _ = return_unit

View File

@ -2,6 +2,7 @@
(* *)
(* Open Source License *)
(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* Copyright (c) 2018 Nomadic Labs, <contact@nomadic-labs.com> *)
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* copy of this software and associated documentation files (the "Software"),*)
@ -46,8 +47,7 @@ module type T = sig
(** [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].
* The [mempool_worker] the underlying worker that individual validations of
* singular operations are delegated to. *)
* 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
(** [shutdown t] closes the peer worker [t]. It returns a list of operation