From 909bae5c679f11bc3bb44df04b0cce0ca16f8e9d Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Tue, 31 Jan 2023 17:15:46 -0600 Subject: [PATCH] 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. --- lightning/src/chain/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index 01eae488..0370c084 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. -- 2.30.2