Skip to content

Commit

Permalink
fix: init perftest subscriber ahead of submissions task
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Livesey <[email protected]>
  • Loading branch information
suchapalaver committed Jul 31, 2023
1 parent 4170db4 commit 6bcede1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/chronicle/src/bootstrap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ where
let perftest_ops_api = api.clone();
let start_time = Instant::now();

let mut tx_notifications = api.notify_commit.subscribe();

tokio::task::spawn(async move {
while ops > 0 {
let identity = AuthId::chronicle();
Expand All @@ -508,7 +510,6 @@ where
}
});

let mut tx_notifications = api.notify_commit.subscribe();
while ops > 0 {
if let Ok(SubmissionStage::Committed(_, _)) = tx_notifications.recv().await {
ops -= 1;
Expand Down

0 comments on commit 6bcede1

Please sign in to comment.