diff --git a/crates/starknet_mempool_p2p_types/src/communication.rs b/crates/starknet_mempool_p2p_types/src/communication.rs index 7e05ee3028e..d376f77364a 100644 --- a/crates/starknet_mempool_p2p_types/src/communication.rs +++ b/crates/starknet_mempool_p2p_types/src/communication.rs @@ -66,38 +66,10 @@ pub enum MempoolP2pPropagatorClientError { } #[async_trait] -impl MempoolP2pPropagatorClient for LocalMempoolP2pPropagatorClient { - async fn add_transaction( - &self, - transaction: RpcTransaction, - ) -> MempoolP2pPropagatorClientResult<()> { - let request = MempoolP2pPropagatorRequest::AddTransaction(transaction); - let response = self.send(request).await; - handle_response_variants!( - MempoolP2pPropagatorResponse, - AddTransaction, - MempoolP2pPropagatorClientError, - MempoolP2pPropagatorError - ) - } - - async fn continue_propagation( - &self, - propagation_metadata: BroadcastedMessageMetadata, - ) -> MempoolP2pPropagatorClientResult<()> { - let request = MempoolP2pPropagatorRequest::ContinuePropagation(propagation_metadata); - let response = self.send(request).await; - handle_response_variants!( - MempoolP2pPropagatorResponse, - ContinuePropagation, - MempoolP2pPropagatorClientError, - MempoolP2pPropagatorError - ) - } -} - -#[async_trait] -impl MempoolP2pPropagatorClient for RemoteMempoolP2pPropagatorClient { +impl MempoolP2pPropagatorClient for T +where + T: Send + Sync + ComponentClient, +{ async fn add_transaction( &self, transaction: RpcTransaction,