Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename generic param in client trait impl #2115

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/starknet_batcher_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ pub enum BatcherClientError {
}

#[async_trait]
impl<T> BatcherClient for T
impl<ComponentClientType> BatcherClient for ComponentClientType
where
T: Send + Sync + ComponentClient<BatcherRequest, BatcherResponse>,
ComponentClientType: Send + Sync + ComponentClient<BatcherRequest, BatcherResponse>,
{
async fn build_proposal(&self, input: BuildProposalInput) -> BatcherClientResult<()> {
let request = BatcherRequest::BuildProposal(input);
Expand Down
4 changes: 2 additions & 2 deletions crates/starknet_gateway_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ pub enum GatewayClientError {
}

#[async_trait]
impl<T> GatewayClient for T
impl<ComponentClientType> GatewayClient for ComponentClientType
where
T: Send + Sync + ComponentClient<GatewayRequest, GatewayResponse>,
ComponentClientType: Send + Sync + ComponentClient<GatewayRequest, GatewayResponse>,
{
#[instrument(skip(self))]
async fn add_tx(&self, gateway_input: GatewayInput) -> GatewayClientResult<TransactionHash> {
Expand Down
5 changes: 3 additions & 2 deletions crates/starknet_mempool_p2p_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ pub enum MempoolP2pPropagatorClientError {
}

#[async_trait]
impl<T> MempoolP2pPropagatorClient for T
impl<ComponentClientType> MempoolP2pPropagatorClient for ComponentClientType
where
T: Send + Sync + ComponentClient<MempoolP2pPropagatorRequest, MempoolP2pPropagatorResponse>,
ComponentClientType:
Send + Sync + ComponentClient<MempoolP2pPropagatorRequest, MempoolP2pPropagatorResponse>,
{
async fn add_transaction(
&self,
Expand Down
4 changes: 2 additions & 2 deletions crates/starknet_mempool_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ pub enum MempoolClientError {
}

#[async_trait]
impl<T> MempoolClient for T
impl<ComponentClientType> MempoolClient for ComponentClientType
where
T: Send + Sync + ComponentClient<MempoolRequest, MempoolResponse>,
ComponentClientType: Send + Sync + ComponentClient<MempoolRequest, MempoolResponse>,
{
async fn add_tx(&self, args: AddTransactionArgsWrapper) -> MempoolClientResult<()> {
let request = MempoolRequest::AddTransaction(args);
Expand Down
Loading