From: Elias Rohrer Date: Tue, 31 Jan 2023 23:15:46 +0000 (-0600) Subject: Add version note in `Confirm` docs X-Git-Tag: v0.0.114-beta~34^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=909bae5c679f11bc3bb44df04b0cce0ca16f8e9d;p=rust-lightning Add version note in `Confirm` docs While now `ChannelManager` will only return previously confirmed transactions, we can't ensure the same for `ChainMonitor`, as we need to maintain backwards compatibility with version prior to 0.0.113, at which we started tracking the block hash in `ChannelMonitor`s. We therefore add a note to the docs stating that users need to track confirmations on their own for channels created prior to 0.0.113. --- diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index 01eae4887..0370c0840 100644 --- a/lightning/src/chain/mod.rs +++ b/lightning/src/chain/mod.rs @@ -176,6 +176,9 @@ pub trait Confirm { /// Returns transactions that must be monitored for reorganization out of the chain along /// with the hash of the block as part of which it had been previously confirmed. /// + /// Note that the returned `Option` might be `None` for channels created with LDK + /// 0.0.112 and prior, in which case you need to manually track previous confirmations. + /// /// Will include any transactions passed to [`transactions_confirmed`] that have insufficient /// confirmations to be safe from a chain reorganization. Will not include any transactions /// passed to [`transaction_unconfirmed`], unless later reconfirmed.