@@ -601,6 +601,9 @@ impl ChannelConfig {
601
601
{
602
602
self . force_close_avoidance_max_fee_satoshis = force_close_avoidance_max_fee_satoshis;
603
603
}
604
+ if let Some ( accept_underpaying_htlcs) = update. accept_underpaying_htlcs {
605
+ self . accept_underpaying_htlcs = accept_underpaying_htlcs;
606
+ }
604
607
}
605
608
}
606
609
@@ -674,14 +677,30 @@ impl crate::util::ser::Readable for ChannelConfig {
674
677
}
675
678
676
679
/// A parallel struct to [`ChannelConfig`] to define partial updates.
677
- #[ allow( missing_docs) ]
678
680
#[ derive( Default ) ]
679
681
pub 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`].
680
684
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`].
681
688
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`].
682
692
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`].
683
695
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`].
684
699
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 > ,
685
704
}
686
705
687
706
impl From < ChannelConfig > for ChannelConfigUpdate {
@@ -696,6 +715,7 @@ impl From<ChannelConfig> for ChannelConfigUpdate {
696
715
force_close_avoidance_max_fee_satoshis : Some (
697
716
config. force_close_avoidance_max_fee_satoshis ,
698
717
) ,
718
+ accept_underpaying_htlcs : Some ( config. accept_underpaying_htlcs ) ,
699
719
}
700
720
}
701
721
}
0 commit comments