]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Add more details about async persistence completion/backgrounding 2023-09-2562-followups
authorMatt Corallo <git@bluematt.me>
Thu, 28 Sep 2023 20:45:27 +0000 (20:45 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 28 Sep 2023 20:45:55 +0000 (20:45 +0000)
This clarifies somewhat that async persistence should run
indefinitely or keep trying via polling, and that either is
acceptable.

lightning/src/chain/chainmonitor.rs

index 60d50bf0adbae7a877cda9300118578640f15afd..6d003df720f6680bdfde4fd6766a064edb8f05c2 100644 (file)
@@ -113,7 +113,10 @@ impl MonitorUpdateId {
 ///  [`ChainMonitor::channel_monitor_updated`] must be called once for *each* update which occurs.
 ///
 ///  If at some point no further progress can be made towards persisting a pending update, the node
-///  should simply shut down.
+///  should simply shut down. Until then, the background task should either loop indefinitely, or
+///  persistence should be regularly retried with [`ChainMonitor::list_pending_monitor_updates`]
+///  and [`ChainMonitor::get_monitor`] (note that if a full monitor is persisted all pending
+///  monitor updates may be marked completed).
 ///
 /// # Using remote watchtowers
 ///