Skip to content

Commit

Permalink
minor rename
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Mar 19, 2024
1 parent 5c71a59 commit 650bf69
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/astria-composer/src/collectors/geth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Geth {
};

match executor_handle
.get()
.get_sequence_action_tx()
.send_timeout(seq_action, Duration::from_millis(500))
.await
{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-composer/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Handle {
}
}

pub(super) fn get(&self) -> mpsc::Sender<SequenceAction> {
pub(super) fn get_sequence_action_tx(&self) -> mpsc::Sender<SequenceAction> {
self.sequence_action_tx.clone()
}
}
Expand Down
30 changes: 25 additions & 5 deletions crates/astria-composer/src/executor/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,16 @@ async fn full_bundle() {
};

// push both sequence actions to the executor in order to force the full bundle to be sent
executor_handle.get().send(seq0.clone()).await.unwrap();
executor_handle.get().send(seq1.clone()).await.unwrap();
executor_handle
.get_sequence_action_tx()
.send(seq0.clone())
.await
.unwrap();
executor_handle
.get_sequence_action_tx()
.send(seq1.clone())
.await
.unwrap();

// wait for the mock sequencer to receive the signed transaction
tokio::time::timeout(
Expand Down Expand Up @@ -301,7 +309,11 @@ async fn bundle_triggered_by_block_timer() {
// make sure at least one block has passed so that the executor will submit the bundle
// despite it not being full
time::pause();
executor_handle.get().send(seq0.clone()).await.unwrap();
executor_handle
.get_sequence_action_tx()
.send(seq0.clone())
.await
.unwrap();
time::advance(Duration::from_millis(cfg.block_time_ms)).await;
time::resume();

Expand Down Expand Up @@ -383,8 +395,16 @@ async fn two_seq_actions_single_bundle() {
// make sure at least one block has passed so that the executor will submit the bundle
// despite it not being full
time::pause();
executor_handle.get().send(seq0.clone()).await.unwrap();
executor_handle.get().send(seq1.clone()).await.unwrap();
executor_handle
.get_sequence_action_tx()
.send(seq0.clone())
.await
.unwrap();
executor_handle
.get_sequence_action_tx()
.send(seq1.clone())
.await
.unwrap();
time::advance(Duration::from_millis(cfg.block_time_ms)).await;
time::resume();

Expand Down

0 comments on commit 650bf69

Please sign in to comment.