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
|
||||
type t = P2p_peer.Id.t
|
||||
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
|
||||
end
|
||||
|
||||
|
@ -142,16 +142,15 @@ module Make(Static: STATIC)(Proto: Registered_protocol.T)
|
||||
end)
|
||||
|
||||
module Name = struct
|
||||
type t = Chain_id.t * Protocol_hash.t
|
||||
let encoding =
|
||||
Data_encoding.tup2
|
||||
Chain_id.encoding
|
||||
Protocol_hash.encoding
|
||||
let base = [ "validator.mempool" ]
|
||||
let pp fmt (chain_id, proto_hash) =
|
||||
Chain_id.pp_short fmt chain_id;
|
||||
Format.pp_print_string fmt ".";
|
||||
Protocol_hash.pp_short fmt proto_hash
|
||||
type t = Chain_id.t
|
||||
let encoding = Chain_id.encoding
|
||||
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"; "worker"; proto_hash ]
|
||||
let pp = Chain_id.pp_short
|
||||
end
|
||||
|
||||
module Request = struct
|
||||
@ -563,7 +562,7 @@ module Make(Static: STATIC)(Proto: Registered_protocol.T)
|
||||
(Worker.launch
|
||||
table
|
||||
limits.worker_limits
|
||||
(chain_id, Proto.hash)
|
||||
chain_id
|
||||
{ limits ; chain_db ; validation_state }
|
||||
(module Handlers) >>= return)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user