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

chore(starknet_mempool): rename to tx_from_address_exists to better reflect implementaion #3173

Merged
merged 1 commit into from
Jan 9, 2025
Merged
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_mempool/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl MempoolCommunicationWrapper {
self.mempool.get_txs(n_txs)
}

pub(crate) fn deploy_account_exists(
pub(crate) fn has_tx_from_address(
&self,
_account_address: ContractAddress,
) -> MempoolResult<bool> {
Expand All @@ -122,7 +122,7 @@ impl ComponentRequestHandler<MempoolRequest, MempoolResponse> for MempoolCommuni
MempoolResponse::GetTransactions(self.get_txs(n_txs))
}
MempoolRequest::DeployAccountExists(account_address) => {
MempoolResponse::DeployAccountExists(self.deploy_account_exists(account_address))
MempoolResponse::DeployAccountExists(self.has_tx_from_address(account_address))
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions crates/starknet_mempool_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ pub trait MempoolClient: Send + Sync {
async fn add_tx(&self, args: AddTransactionArgsWrapper) -> MempoolClientResult<()>;
async fn commit_block(&self, args: CommitBlockArgs) -> MempoolClientResult<()>;
async fn get_txs(&self, n_txs: usize) -> MempoolClientResult<Vec<AccountTransaction>>;
async fn deploy_account_exists(
async fn has_tx_from_address(
&self,
account_address: ContractAddress,
contract_address: ContractAddress,
) -> MempoolClientResult<bool>;
}

Expand Down Expand Up @@ -104,11 +104,11 @@ where
)
}

async fn deploy_account_exists(
async fn has_tx_from_address(
&self,
account_address: ContractAddress,
contract_address: ContractAddress,
) -> MempoolClientResult<bool> {
let request = MempoolRequest::DeployAccountExists(account_address);
let request = MempoolRequest::DeployAccountExists(contract_address);
let response = self.send(request).await;
handle_response_variants!(
MempoolResponse,
Expand Down