diff --git a/src/lib_shell/mempool_peer_worker.ml b/src/lib_shell/mempool_peer_worker.ml index 3aad729fd..7f79aed1c 100644 --- a/src/lib_shell/mempool_peer_worker.ml +++ b/src/lib_shell/mempool_peer_worker.ml @@ -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 diff --git a/src/lib_shell/mempool_worker.ml b/src/lib_shell/mempool_worker.ml index bca7bba98..b6d266a98 100644 --- a/src/lib_shell/mempool_worker.ml +++ b/src/lib_shell/mempool_worker.ml @@ -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)