@@ -327,7 +327,7 @@ pub struct ChannelHandshakeLimits {
327327 ///
328328 /// Default value: `2016`, which we also enforce as a maximum value so you can tweak config to
329329 /// 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 ,
331331}
332332
333333impl Default for ChannelHandshakeLimits {
@@ -582,7 +582,9 @@ pub struct ChannelConfig {
582582impl ChannelConfig {
583583 /// Applies the given [`ChannelConfigUpdate`] as a partial update to the [`ChannelConfig`].
584584 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+ {
586588 self . forwarding_fee_proportional_millionths = forwarding_fee_proportional_millionths;
587589 }
588590 if let Some ( forwarding_fee_base_msat) = update. forwarding_fee_base_msat {
@@ -594,7 +596,9 @@ impl ChannelConfig {
594596 if let Some ( max_dust_htlc_exposure_msat) = update. max_dust_htlc_exposure_msat {
595597 self . max_dust_htlc_exposure = max_dust_htlc_exposure_msat;
596598 }
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+ {
598602 self . force_close_avoidance_max_fee_satoshis = force_close_avoidance_max_fee_satoshis;
599603 }
600604 }
@@ -683,11 +687,15 @@ pub struct ChannelConfigUpdate {
683687impl From < ChannelConfig > for ChannelConfigUpdate {
684688 fn from ( config : ChannelConfig ) -> ChannelConfigUpdate {
685689 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+ ) ,
687693 forwarding_fee_base_msat : Some ( config. forwarding_fee_base_msat ) ,
688694 cltv_expiry_delta : Some ( config. cltv_expiry_delta ) ,
689695 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+ ) ,
691699 }
692700 }
693701}
@@ -760,8 +768,9 @@ impl crate::util::ser::Readable for LegacyChannelConfig {
760768 } ) ;
761769 let max_dust_htlc_exposure_msat_fixed_limit =
762770 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+ ) ;
765774 Ok ( Self {
766775 options : ChannelConfig {
767776 forwarding_fee_proportional_millionths,
0 commit comments