Shell/mempool: add identifiers to Worker.Name instances
This commit is contained in:
parent
6a14afc1b0
commit
8ba2bc2001
@ -226,7 +226,12 @@ module Make (Mempool_worker: Mempool_worker.T)
|
|||||||
module Name = struct
|
module Name = struct
|
||||||
type t = P2p_peer.Id.t
|
type t = P2p_peer.Id.t
|
||||||
let encoding = P2p_peer.Id.encoding
|
let encoding = P2p_peer.Id.encoding
|
||||||
let base = [ "node.mempool.peer_worker" ]
|
let base =
|
||||||
|
let proto_hash =
|
||||||
|
let _: string = Format.flush_str_formatter () in
|
||||||
|
Format.fprintf Format.str_formatter "%a" Protocol_hash.pp Proto.hash;
|
||||||
|
Format.flush_str_formatter () in
|
||||||
|
[ "node"; "mempool"; "peer_worker"; proto_hash ]
|
||||||
let pp = P2p_peer.Id.pp
|
let pp = P2p_peer.Id.pp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -142,16 +142,15 @@ module Make(Static: STATIC)(Proto: Registered_protocol.T)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
module Name = struct
|
module Name = struct
|
||||||
type t = Chain_id.t * Protocol_hash.t
|
type t = Chain_id.t
|
||||||
let encoding =
|
let encoding = Chain_id.encoding
|
||||||
Data_encoding.tup2
|
let base =
|
||||||
Chain_id.encoding
|
let proto_hash =
|
||||||
Protocol_hash.encoding
|
let _: string = Format.flush_str_formatter () in
|
||||||
let base = [ "validator.mempool" ]
|
Format.fprintf Format.str_formatter "%a" Protocol_hash.pp Proto.hash;
|
||||||
let pp fmt (chain_id, proto_hash) =
|
Format.flush_str_formatter () in
|
||||||
Chain_id.pp_short fmt chain_id;
|
[ "node"; "mempool"; "worker"; proto_hash ]
|
||||||
Format.pp_print_string fmt ".";
|
let pp = Chain_id.pp_short
|
||||||
Protocol_hash.pp_short fmt proto_hash
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module Request = struct
|
module Request = struct
|
||||||
@ -563,7 +562,7 @@ module Make(Static: STATIC)(Proto: Registered_protocol.T)
|
|||||||
(Worker.launch
|
(Worker.launch
|
||||||
table
|
table
|
||||||
limits.worker_limits
|
limits.worker_limits
|
||||||
(chain_id, Proto.hash)
|
chain_id
|
||||||
{ limits ; chain_db ; validation_state }
|
{ limits ; chain_db ; validation_state }
|
||||||
(module Handlers) >>= return)
|
(module Handlers) >>= return)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user