Skip to content

Commit 8d0dda5

Browse files
committed
f highlight that idempotency is technically only necessary absent atomicity
1 parent 1d3b771 commit 8d0dda5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,12 @@ pub trait Persist<ChannelSigner: EcdsaChannelSigner> {
163163
/// Archiving the data in a backup location (rather than deleting it fully) is useful for
164164
/// hedging against data loss in case of unexpected failure.
165165
///
166-
/// Note that if a crash occurs during the archiving process, a state may emerge with the
167-
/// archival operation only being partially complete. In that scenario, the monitor may still be
168-
/// loaded on startup pending successful completion of the archive process. Additionally,
169-
/// because the archive operation could be retried on restart, this method must be idempotent,
170-
/// ensuring it can handle scenarios where the monitor already exists in the archive.
166+
/// Note that if a crash occurs during the archiving process, and its implementation is not
167+
/// atomic, a state may emerge with the archival operation only being partially complete. In
168+
/// that scenario, the monitor may still be loaded on startup pending successful completion of
169+
/// the archive process. Additionally, because the archive operation could be retried on
170+
/// restart, this method must in that case be idempotent, ensuring it can handle scenarios where
171+
/// the monitor already exists in the archive.
171172
fn archive_persisted_channel(&self, channel_funding_outpoint: OutPoint);
172173
}
173174

0 commit comments

Comments
 (0)