diff --git a/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs b/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs index 9256d26c3ac5c9..f4b114e21222c3 100644 --- a/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs +++ b/core/src/banking_stage/transaction_scheduler/prio_graph_scheduler.rs @@ -195,7 +195,8 @@ impl PrioGraphScheduler { let mut num_scheduled: usize = 0; let mut num_sent: usize = 0; let mut num_unschedulable: usize = 0; - while num_scheduled < self.config.max_transactions_per_scheduling_pass { + 'outer_schedule_loop: while num_scheduled < self.config.max_transactions_per_scheduling_pass + { // If nothing is in the main-queue of the `PrioGraph` then there's nothing left to schedule. if self.prio_graph.is_empty() { break; @@ -264,12 +265,12 @@ impl PrioGraphScheduler { { schedulable_threads.remove(thread_id); if schedulable_threads.is_empty() { - break; + break 'outer_schedule_loop; } } if num_scheduled >= self.config.max_transactions_per_scheduling_pass { - break; + break 'outer_schedule_loop; } } }