(&mut self)
| 315 | } |
| 316 | |
| 317 | async fn read_from_l2(&mut self) { |
| 318 | let peg_out_result = self.chain_service.get_peg_out_init().await; |
| 319 | if peg_out_result.is_ok() { |
| 320 | let mut events = peg_out_result.unwrap(); |
| 321 | for peg_out_graph in self.data.peg_out_graphs.iter_mut() { |
| 322 | if !peg_out_graph.is_peg_out_initiated() { |
| 323 | match peg_out_graph.match_and_set_peg_out_event(&mut events).await { |
| 324 | Ok(_) => { |
| 325 | if peg_out_graph.peg_out_chain_event.is_some() { |
| 326 | println!( |
| 327 | "Peg-out graph ID: {} Event Matched, Event: {:?}", |
| 328 | peg_out_graph.id(), |
| 329 | peg_out_graph.peg_out_chain_event |
| 330 | ) |
| 331 | } |
| 332 | } |
| 333 | Err(err) => println!("Error: {}", err), |
| 334 | } |
| 335 | } |
| 336 | } |
| 337 | } else { |
| 338 | panic!("Get event failed from L2 chain: {:?}", peg_out_result.err()); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | async fn get_latest_file_names( |
| 343 | data_store: &DataStore, |
no test coverage detected