@@ -327,7 +327,7 @@ pub struct ChannelHandshakeLimits {
327
327
///
328
328
/// Default value: `2016`, which we also enforce as a maximum value so you can tweak config to
329
329
/// reduce the loss of having useless locked funds (if your peer accepts)
330
- pub their_to_self_delay : u16
330
+ pub their_to_self_delay : u16 ,
331
331
}
332
332
333
333
impl Default for ChannelHandshakeLimits {
@@ -582,7 +582,9 @@ pub struct ChannelConfig {
582
582
impl ChannelConfig {
583
583
/// Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`].
584
584
pub fn apply ( & mut self , update : & ChannelConfigUpdate ) {
585
- if let Some ( forwarding_fee_proportional_millionths) = update. forwarding_fee_proportional_millionths {
585
+ if let Some ( forwarding_fee_proportional_millionths) =
586
+ update. forwarding_fee_proportional_millionths
587
+ {
586
588
self . forwarding_fee_proportional_millionths = forwarding_fee_proportional_millionths;
587
589
}
588
590
if let Some ( forwarding_fee_base_msat) = update. forwarding_fee_base_msat {
@@ -594,7 +596,9 @@ impl ChannelConfig {
594
596
if let Some ( max_dust_htlc_exposure_msat) = update. max_dust_htlc_exposure_msat {
595
597
self . max_dust_htlc_exposure = max_dust_htlc_exposure_msat;
596
598
}
597
- if let Some ( force_close_avoidance_max_fee_satoshis) = update. force_close_avoidance_max_fee_satoshis {
599
+ if let Some ( force_close_avoidance_max_fee_satoshis) =
600
+ update. force_close_avoidance_max_fee_satoshis
601
+ {
598
602
self . force_close_avoidance_max_fee_satoshis = force_close_avoidance_max_fee_satoshis;
599
603
}
600
604
}
@@ -683,11 +687,15 @@ pub struct ChannelConfigUpdate {
683
687
impl From < ChannelConfig > for ChannelConfigUpdate {
684
688
fn from ( config : ChannelConfig ) -> ChannelConfigUpdate {
685
689
ChannelConfigUpdate {
686
- forwarding_fee_proportional_millionths : Some ( config. forwarding_fee_proportional_millionths ) ,
690
+ forwarding_fee_proportional_millionths : Some (
691
+ config. forwarding_fee_proportional_millionths ,
692
+ ) ,
687
693
forwarding_fee_base_msat : Some ( config. forwarding_fee_base_msat ) ,
688
694
cltv_expiry_delta : Some ( config. cltv_expiry_delta ) ,
689
695
max_dust_htlc_exposure_msat : Some ( config. max_dust_htlc_exposure ) ,
690
- force_close_avoidance_max_fee_satoshis : Some ( config. force_close_avoidance_max_fee_satoshis ) ,
696
+ force_close_avoidance_max_fee_satoshis : Some (
697
+ config. force_close_avoidance_max_fee_satoshis ,
698
+ ) ,
691
699
}
692
700
}
693
701
}
@@ -760,8 +768,9 @@ impl crate::util::ser::Readable for LegacyChannelConfig {
760
768
} ) ;
761
769
let max_dust_htlc_exposure_msat_fixed_limit =
762
770
max_dust_htlc_exposure_msat_fixed_limit. unwrap_or ( 5_000_000 ) ;
763
- let max_dust_htlc_exposure_msat = max_dust_htlc_exposure_enum
764
- . unwrap_or ( MaxDustHTLCExposure :: FixedLimitMsat ( max_dust_htlc_exposure_msat_fixed_limit) ) ;
771
+ let max_dust_htlc_exposure_msat = max_dust_htlc_exposure_enum. unwrap_or (
772
+ MaxDustHTLCExposure :: FixedLimitMsat ( max_dust_htlc_exposure_msat_fixed_limit) ,
773
+ ) ;
765
774
Ok ( Self {
766
775
options : ChannelConfig {
767
776
forwarding_fee_proportional_millionths,
0 commit comments