Skip to content

Commit

Permalink
refactor: mock batcher as a service (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeletstarkware authored Jul 8, 2024
1 parent 0346258 commit c7fa63e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions crates/tests-integration/src/integration_test_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use starknet_mempool_node::communication::{create_node_channels, create_node_cli
use starknet_mempool_node::components::create_components;
use starknet_mempool_node::servers::{create_servers, get_server_future};
use starknet_mempool_types::mempool_types::ThinTransaction;
use starknet_task_executor::executor::TaskExecutor;
use starknet_task_executor::tokio_executor::TokioExecutor;
use tokio::runtime::Handle;
use tokio::task::JoinHandle;
Expand Down Expand Up @@ -78,7 +77,6 @@ impl IntegrationTestSetup {
}

pub async fn get_txs(&self, n_txs: usize) -> Vec<ThinTransaction> {
let batcher = self.batcher.clone();
self.task_executor.spawn(async move { batcher.get_txs(n_txs).await }).await.unwrap()
self.batcher.get_txs(n_txs).await
}
}
1 change: 0 additions & 1 deletion crates/tests-integration/src/mock_batcher.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use starknet_mempool_types::communication::SharedMempoolClient;
use starknet_mempool_types::mempool_types::ThinTransaction;

#[derive(Clone)]
pub struct MockBatcher {
mempool_client: SharedMempoolClient,
}
Expand Down

0 comments on commit c7fa63e

Please sign in to comment.