Skip to content

Commit c0f6a43

Browse files
committed
Persist NetworkGraph on exit
1 parent 0af82ab commit c0f6a43

File tree

1 file changed

+6
-0
lines changed
  • lightning-background-processor/src

1 file changed

+6
-0
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ impl BackgroundProcessor {
289289
}
290290
}
291291
}
292+
293+
// Persist NetworkGraph on exit
294+
if let Some(ref handler) = net_graph_msg_handler {
295+
persister.persist_graph(handler.network_graph())?;
296+
}
297+
292298
// After we exit, ensure we persist the ChannelManager one final time - this avoids
293299
// some races where users quit while channel updates were in-flight, with
294300
// ChannelMonitor update(s) persisted without a corresponding ChannelManager update.

0 commit comments

Comments
 (0)