Pull anchor check into helper function
[rust-lightning] / lightning / src / ln / chan_utils.rs
index c002dfaea25f62297518d9f8b94dcc898004c7da..b7676ddff15290b876854b007c3f1a05572f1be4 100644 (file)
@@ -852,6 +852,11 @@ impl ChannelTransactionParameters {
                self.counterparty_parameters.is_some() && self.funding_outpoint.is_some()
        }
 
+       /// Whether the channel supports zero-fee HTLC transaction anchors.
+       pub(crate) fn supports_anchors(&self) -> bool {
+               self.channel_type_features.supports_anchors_zero_fee_htlc_tx()
+       }
+
        /// Convert the holder/counterparty parameters to broadcaster/countersignatory-organized parameters,
        /// given that the holder is the broadcaster.
        ///