X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FMonitorUpdatingPersister.java;h=c71b5c44708bd5b3785a53e2a4c55ad88d4b5903;hp=4b4fd8fc2d20200f820f57324ded7b1bc13110d8;hb=2bb592fb946e316dba9f4d1123f8ac72ff4e9bf8;hpb=519dc944de5b88f95975140a13fbc6d77dd15a95 diff --git a/src/main/java/org/ldk/structs/MonitorUpdatingPersister.java b/src/main/java/org/ldk/structs/MonitorUpdatingPersister.java index 4b4fd8fc..c71b5c44 100644 --- a/src/main/java/org/ldk/structs/MonitorUpdatingPersister.java +++ b/src/main/java/org/ldk/structs/MonitorUpdatingPersister.java @@ -82,9 +82,10 @@ import javax.annotation.Nullable; * * # Pruning stale channel updates * - * Stale updates are pruned when a full monitor is written. The old monitor is first read, and if - * that succeeds, updates in the range between the old and new monitors are deleted. The `lazy` - * flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions + * Stale updates are pruned when the consolidation threshold is reached according to `maximum_pending_updates`. + * Monitor updates in the range between the latest `update_id` and `update_id - maximum_pending_updates` + * are deleted. + * The `lazy` flag is used on the [`KVStore::remove`] method, so there are no guarantees that the deletions * will complete. However, stale updates are not a problem for data integrity, since updates are * only read that are higher than the stored [`ChannelMonitor`]'s `update_id`. *