@@ -272,8 +272,8 @@ fn update_scorer<'a, S: 'static + Deref<Target = SC> + Send + Sync, SC: 'a + Wri
272272macro_rules! define_run_body {
273273 ( $persister: ident, $chain_monitor: ident, $process_chain_monitor_events: expr,
274274 $channel_manager: ident, $process_channel_manager_events: expr,
275- $gossip_sync: ident, $peer_manager: ident, $logger : ident , $scorer : ident,
276- $loop_exit_check: expr, $await: expr, $get_timer: expr, $timer_elapsed: expr,
275+ $gossip_sync: ident, $peer_manager: ident, $process_peer_manager_events : expr , $logger : ident,
276+ $scorer : ident , $ loop_exit_check: expr, $await: expr, $get_timer: expr, $timer_elapsed: expr,
277277 $check_slow_await: expr)
278278 => { {
279279 log_trace!( $logger, "Calling ChannelManager's timer_tick_occurred on startup" ) ;
@@ -291,6 +291,7 @@ macro_rules! define_run_body {
291291 loop {
292292 $process_channel_manager_events;
293293 $process_chain_monitor_events;
294+ $process_peer_manager_events;
294295
295296 // Note that the PeerManager::process_events may block on ChannelManager's locks,
296297 // hence it comes last here. When the ChannelManager finishes whatever it's doing,
@@ -653,7 +654,8 @@ where
653654 define_run_body ! ( persister,
654655 chain_monitor, chain_monitor. process_pending_events_async( async_event_handler) . await ,
655656 channel_manager, channel_manager. process_pending_events_async( async_event_handler) . await ,
656- gossip_sync, peer_manager, logger, scorer, should_break, {
657+ gossip_sync, peer_manager, peer_manager. process_pending_events_async( async_event_handler) . await ,
658+ logger, scorer, should_break, {
657659 let fut = Selector {
658660 a: channel_manager. get_event_or_persistence_needed_future( ) ,
659661 b: chain_monitor. get_update_future( ) ,
@@ -742,7 +744,7 @@ impl BackgroundProcessor {
742744 CM : ' static + Deref < Target = ChannelManager < CW , T , ES , NS , SP , F , R , L > > + Send + Sync ,
743745 PGS : ' static + Deref < Target = P2PGossipSync < G , UL , L > > + Send + Sync ,
744746 RGS : ' static + Deref < Target = RapidGossipSync < G , L > > + Send ,
745- APM : APeerManager + Send + Sync ,
747+ APM : APeerManager + EventsProvider + Send + Sync ,
746748 PM : ' static + Deref < Target = APM > + Send + Sync ,
747749 S : ' static + Deref < Target = SC > + Send + Sync ,
748750 SC : for < ' b > WriteableScore < ' b > ,
@@ -784,7 +786,8 @@ impl BackgroundProcessor {
784786 } ;
785787 define_run_body ! ( persister, chain_monitor, chain_monitor. process_pending_events( & event_handler) ,
786788 channel_manager, channel_manager. process_pending_events( & event_handler) ,
787- gossip_sync, peer_manager, logger, scorer, stop_thread. load( Ordering :: Acquire ) ,
789+ gossip_sync, peer_manager, peer_manager. process_pending_events( & event_handler) ,
790+ logger, scorer, stop_thread. load( Ordering :: Acquire ) ,
788791 { Sleeper :: from_two_futures(
789792 channel_manager. get_event_or_persistence_needed_future( ) ,
790793 chain_monitor. get_update_future( )
0 commit comments