File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
ethexe/service/src/tests/utils Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -322,13 +322,23 @@ impl TestEnv {
322322 } ;
323323
324324 let mut service = NetworkService :: new ( config, runtime_config) . unwrap ( ) ;
325+ let mut observer_events = observer_events. 1 . new_receiver ( ) ;
325326
326327 let local_peer_id = service. local_peer_id ( ) ;
327328
328329 let handle = task:: spawn (
329330 async move {
330331 loop {
331- let _event = service. select_next_some ( ) . await ;
332+ tokio:: select! {
333+ _event = service. select_next_some( ) => { }
334+ event = observer_events. select_next_some( ) => {
335+ if let ethexe_observer:: ObserverEvent :: BlockSynced ( block_hash) = event {
336+ service
337+ . set_chain_head( block_hash)
338+ . expect( "failed to update bootstrap network chain head" ) ;
339+ }
340+ }
341+ }
332342 }
333343 }
334344 . instrument ( tracing:: error_span!( "network-stream" ) ) ,
You can’t perform that action at this time.
0 commit comments