@@ -601,6 +601,9 @@ impl ChannelConfig {
601601 {
602602 self . force_close_avoidance_max_fee_satoshis = force_close_avoidance_max_fee_satoshis;
603603 }
604+ if let Some ( accept_underpaying_htlcs) = update. accept_underpaying_htlcs {
605+ self . accept_underpaying_htlcs = accept_underpaying_htlcs;
606+ }
604607 }
605608}
606609
@@ -674,14 +677,30 @@ impl crate::util::ser::Readable for ChannelConfig {
674677}
675678
676679/// A parallel struct to [`ChannelConfig`] to define partial updates.
677- #[ allow( missing_docs) ]
678680#[ derive( Default ) ]
679681pub struct ChannelConfigUpdate {
682+ /// Amount (in millionths of a satoshi) charged per satoshi for payments forwarded outbound over the channel. See
683+ /// [`ChannelConfig::forwarding_fee_proportional_millionths`].
680684 pub forwarding_fee_proportional_millionths : Option < u32 > ,
685+
686+ /// Amount (in milli-satoshi) charged for payments forwarded outbound over the channel. See
687+ /// [`ChannelConfig::forwarding_fee_base_msat`].
681688 pub forwarding_fee_base_msat : Option < u32 > ,
689+
690+ /// The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded over the channel this
691+ /// config applies to. See [`ChannelConfig::cltv_expiry_delta`].
682692 pub cltv_expiry_delta : Option < u16 > ,
693+
694+ /// The total exposure we are willing to allow to dust HTLCs. See [`ChannelConfig::max_dust_htlc_exposure`].
683695 pub max_dust_htlc_exposure_msat : Option < MaxDustHTLCExposure > ,
696+
697+ /// The additional fee we're willing to pay to avoid waiting for the counterparty's `to_self_delay` to reclaim
698+ /// funds. See [`ChannelConfig::force_close_avoidance_max_fee_satoshis`].
684699 pub force_close_avoidance_max_fee_satoshis : Option < u64 > ,
700+
701+ /// If set, allows this channel's counterparty to skim an additional fee off this node's inbound HTLCs. See
702+ /// [`ChannelConfig::accept_underpaying_htlcs`].
703+ pub accept_underpaying_htlcs : Option < bool > ,
685704}
686705
687706impl From < ChannelConfig > for ChannelConfigUpdate {
@@ -696,6 +715,7 @@ impl From<ChannelConfig> for ChannelConfigUpdate {
696715 force_close_avoidance_max_fee_satoshis : Some (
697716 config. force_close_avoidance_max_fee_satoshis ,
698717 ) ,
718+ accept_underpaying_htlcs : Some ( config. accept_underpaying_htlcs ) ,
699719 }
700720 }
701721}
0 commit comments