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 {
208
208
let stop_thread = Arc :: new ( AtomicBool :: new ( false ) ) ;
209
209
let stop_thread_clone = stop_thread. clone ( ) ;
210
210
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 ( ) ) } ;
216
212
217
213
log_trace ! ( logger, "Calling ChannelManager's timer_tick_occurred on startup" ) ;
218
214
channel_manager. timer_tick_occurred ( ) ;
@@ -261,7 +257,7 @@ impl BackgroundProcessor {
261
257
if last_prune_call. elapsed ( ) . as_secs ( ) > NETWORK_PRUNE_TIMER {
262
258
if let Some ( ref handler) = net_graph_msg_handler {
263
259
log_trace ! ( logger, "Pruning network graph of stale entries" ) ;
264
- ( * handler. deref ( ) ) . network_graph ( ) . remove_stale_channels ( ) ;
260
+ handler. network_graph ( ) . remove_stale_channels ( ) ;
265
261
last_prune_call = Instant :: now ( ) ;
266
262
}
267
263
}
You can’t perform that action at this time.
0 commit comments