File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
lightning-background-processor/src Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -208,11 +208,7 @@ impl BackgroundProcessor {
208208 let stop_thread = Arc :: new ( AtomicBool :: new ( false ) ) ;
209209 let stop_thread_clone = stop_thread. clone ( ) ;
210210 let handle = thread:: spawn ( move || -> Result < ( ) , std:: io:: Error > {
211- let event_handler = if let Some ( ref handler) = net_graph_msg_handler {
212- DecoratingEventHandler { event_handler, net_graph_msg_handler : Some ( & * * handler) }
213- } else {
214- DecoratingEventHandler { event_handler, net_graph_msg_handler : None }
215- } ;
211+ let event_handler = DecoratingEventHandler { event_handler, net_graph_msg_handler : net_graph_msg_handler. as_ref ( ) . map ( |t| t. deref ( ) ) } ;
216212
217213 log_trace ! ( logger, "Calling ChannelManager's timer_tick_occurred on startup" ) ;
218214 channel_manager. timer_tick_occurred ( ) ;
@@ -261,7 +257,7 @@ impl BackgroundProcessor {
261257 if last_prune_call. elapsed ( ) . as_secs ( ) > NETWORK_PRUNE_TIMER {
262258 if let Some ( ref handler) = net_graph_msg_handler {
263259 log_trace ! ( logger, "Pruning network graph of stale entries" ) ;
264- ( * handler. deref ( ) ) . network_graph ( ) . remove_stale_channels ( ) ;
260+ handler. network_graph ( ) . remove_stale_channels ( ) ;
265261 last_prune_call = Instant :: now ( ) ;
266262 }
267263 }
You can’t perform that action at this time.
0 commit comments