From: Wilmer Paulino Date: Fri, 29 Sep 2023 16:16:48 +0000 (-0700) Subject: Note required levels of descendant transactions in get_spendable_outputs X-Git-Tag: v0.0.117-rc1~8^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=6cf035146294119c75bab056715410e53369cced;p=rust-lightning Note required levels of descendant transactions in get_spendable_outputs Three levels of descendant transactions starting from the channel's funding transaction should cover all potential spendable outputs. The first level covers the commitment transaction. The second level covers the to_self claims, to_remote claims, second-stage HTLC claims and justice transactions. The third levels covers the justice transactions on second-stage HTLCs, and to_self claims on second-stage HTLCs. --- diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 7088d32d..61669b78 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -1680,8 +1680,7 @@ impl ChannelMonitor { /// missed/unhandled descriptors. For the purpose of gathering historical records, if the /// channel close has fully resolved (i.e., [`ChannelMonitor::get_claimable_balances`] returns /// an empty set), you can retrieve all spendable outputs by providing all descendant spending - /// transactions starting from the channel's funding or closing transaction that have at least - /// [`ANTI_REORG_DELAY`] confirmations. + /// transactions starting from the channel's funding transaction and going down three levels. /// /// `tx` is a transaction we'll scan the outputs of. Any transaction can be provided. If any /// outputs which can be spent by us are found, at least one descriptor is returned.