diff --git a/nomos-services/mempool/src/lib.rs b/nomos-services/mempool/src/lib.rs index 50e5a6f4..5d2ffddd 100644 --- a/nomos-services/mempool/src/lib.rs +++ b/nomos-services/mempool/src/lib.rs @@ -20,12 +20,11 @@ use overwatch_rs::services::{ ServiceCore, ServiceData, ServiceId, }; -pub struct Mempool< - N: NetworkBackend + Send + Sync + 'static, - Tx: Debug + Send + Sync + 'static, - Id: Debug + Send + Sync + 'static, - P: Pool + Send + Sync + 'static, -> { +pub struct Mempool +where + P::Tx: Debug + Send + Sync + 'static, + P::Id: Debug + Send + Sync + 'static, +{ service_state: ServiceStateHandle, network_relay: Relay>, pool: P, @@ -74,26 +73,26 @@ impl Debug for MempoolMsg { impl RelayMessage for MempoolMsg {} -impl< - N: NetworkBackend + Send + Sync + 'static, - Tx: Debug + Send + Sync + 'static, - Id: Debug + Send + Sync + 'static, - P: Pool + Send + Sync + 'static, - > ServiceData for Mempool +impl ServiceData for Mempool +where + N: NetworkBackend + Send + Sync + 'static, + P: Pool + Send + Sync + 'static, + P::Id: Debug + Send + Sync + 'static, + P::Tx: Debug + Send + Sync + 'static, { const SERVICE_ID: ServiceId = "Mempool"; type Settings = (); type State = NoState; type StateOperator = NoOperator; - type Message = MempoolMsg; + type Message = MempoolMsg<

::Tx,

::Id>; } #[async_trait::async_trait] -impl ServiceCore for Mempool +impl ServiceCore for Mempool where - Tx: Debug + Send + Sync + 'static, - Id: Debug + Send + Sync + 'static, - P: Pool + Send + Sync + 'static, + P: Pool + Send + Sync + 'static, + P::Id: Debug + Send + Sync + 'static, + P::Tx: Debug + Send + Sync + 'static, N: NetworkBackend + Send + Sync + 'static, { fn init(service_state: ServiceStateHandle) -> Result {