(&mut self)
| 383 | } |
| 384 | |
| 385 | pub async fn handle_automatic_command(&mut self) -> io::Result<()> { |
| 386 | loop { |
| 387 | self.client.sync().await; |
| 388 | |
| 389 | let old_data = self.client.data().clone(); |
| 390 | |
| 391 | self.client.process_peg_ins().await; |
| 392 | self.client.process_peg_outs().await; |
| 393 | |
| 394 | // A bit inefficient, but fine for now: only flush if data changed |
| 395 | if self.client.data() != &old_data { |
| 396 | self.client.flush().await; |
| 397 | } else { |
| 398 | sleep(Duration::from_millis(250)).await; |
| 399 | } |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | // TODO: there are verifier's commands missing here |
| 404 | pub fn get_broadcast_command() -> Command { |
no test coverage detected