Loop over the pipeline until it is idle, executing every derived block through the engine. Returns the number of L2 blocks derived and executed.
(&mut self)
| 591 | /// |
| 592 | /// Returns the number of L2 blocks derived and executed. |
| 593 | pub async fn run_until_idle(&mut self) -> usize { |
| 594 | let mut derived = 0; |
| 595 | loop { |
| 596 | match self.step().await { |
| 597 | NodeStepResult::DerivationProgress => derived += 1, |
| 598 | NodeStepResult::AdvancedOrigin => {} |
| 599 | NodeStepResult::Idle => break, |
| 600 | } |
| 601 | } |
| 602 | derived |
| 603 | } |
| 604 | |
| 605 | /// Drain any pending gossip blocks from the P2P transport without blocking. |
| 606 | /// |