X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fconfig.rs;h=bfa5e08ea03dd3dcbcd76b6d535f55c6b66e74b5;hb=6fd13d7b22c315d845f1df167719bc9869c02580;hp=b948a13835708db4ee3cb6328b5951f733f1b1a1;hpb=85a5b31bb82c14e43a1691ceb4201dab18050ab9;p=rust-lightning diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index b948a138..bfa5e08e 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -149,11 +149,12 @@ pub struct ChannelHandshakeConfig { /// Maximum value: 1,000,000, any values larger than 1 Million will be treated as 1 Million (or 100%) /// instead, although channel negotiations will fail in that case. pub their_channel_reserve_proportional_millionths: u32, - #[cfg(anchors)] - /// If set, we attempt to negotiate the `anchors_zero_fee_htlc_tx`option for outbound channels. + /// If set, we attempt to negotiate the `anchors_zero_fee_htlc_tx`option for all future + /// channels. This feature requires having a reserve of onchain funds readily available to bump + /// transactions in the event of a channel force close to avoid the possibility of losing funds. /// /// If this option is set, channels may be created that will not be readable by LDK versions - /// prior to 0.0.114, causing [`ChannelManager`]'s read method to return a + /// prior to 0.0.116, causing [`ChannelManager`]'s read method to return a /// [`DecodeError::InvalidValue`]. /// /// Note that setting this to true does *not* prevent us from opening channels with @@ -196,7 +197,6 @@ impl Default for ChannelHandshakeConfig { announced_channel: false, commit_upfront_shutdown_pubkey: true, their_channel_reserve_proportional_millionths: 10_000, - #[cfg(anchors)] negotiate_anchors_zero_fee_htlc_tx: false, our_max_accepted_htlcs: 50, } @@ -412,9 +412,12 @@ pub struct ChannelConfig { /// # Note /// It's important for payee wallet software to verify that [`PaymentClaimable::amount_msat`] is /// as-expected if this feature is activated, otherwise they may lose money! + /// [`PaymentClaimable::counterparty_skimmed_fee_msat`] provides the fee taken by the + /// counterparty. /// /// # Note /// Switching this config flag on may break compatibility with versions of LDK prior to 0.0.116. + /// Unsetting this flag between restarts may lead to payment receive failures. /// /// Default value: false. /// @@ -423,6 +426,7 @@ pub struct ChannelConfig { /// [`HTLCIntercepted`]: crate::events::Event::HTLCIntercepted /// [`HTLCIntercepted::expected_outbound_amount_msat`]: crate::events::Event::HTLCIntercepted::expected_outbound_amount_msat /// [`PaymentClaimable::amount_msat`]: crate::events::Event::PaymentClaimable::amount_msat + /// [`PaymentClaimable::counterparty_skimmed_fee_msat`]: crate::events::Event::PaymentClaimable::counterparty_skimmed_fee_msat // TODO: link to bLIP when it's merged pub accept_underpaying_htlcs: bool, }