From 08599b818825e3980ba09ab3199b0c2eee6f8237 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 4 Jun 2024 01:13:40 +0000 Subject: [PATCH] Reformat `channel_state.rs` to match rustfmt requirements --- lightning/src/ln/channel_state.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lightning/src/ln/channel_state.rs b/lightning/src/ln/channel_state.rs index 776e742f3..4a08e4022 100644 --- a/lightning/src/ln/channel_state.rs +++ b/lightning/src/ln/channel_state.rs @@ -468,11 +468,11 @@ impl ChannelDetails { pub(super) fn from_channel_context( context: &ChannelContext, best_block_height: u32, latest_features: InitFeatures, - fee_estimator: &LowerBoundedFeeEstimator + fee_estimator: &LowerBoundedFeeEstimator, ) -> Self where SP::Target: SignerProvider, - F::Target: FeeEstimator + F::Target: FeeEstimator, { let balance = context.get_available_balances(fee_estimator); let (to_remote_reserve_satoshis, to_self_reserve_satoshis) = @@ -490,15 +490,26 @@ impl ChannelDetails { // Else `Channel::get_counterparty_htlc_minimum_msat` could return the // default `0` value set by `Channel::new_outbound`. outbound_htlc_minimum_msat: if context.have_received_message() { - Some(context.get_counterparty_htlc_minimum_msat()) } else { None }, + Some(context.get_counterparty_htlc_minimum_msat()) + } else { + None + }, outbound_htlc_maximum_msat: context.get_counterparty_htlc_maximum_msat(), }, funding_txo: context.get_funding_txo(), // Note that accept_channel (or open_channel) is always the first message, so // `have_received_message` indicates that type negotiation has completed. - channel_type: if context.have_received_message() { Some(context.get_channel_type().clone()) } else { None }, + channel_type: if context.have_received_message() { + Some(context.get_channel_type().clone()) + } else { + None + }, short_channel_id: context.get_short_channel_id(), - outbound_scid_alias: if context.is_usable() { Some(context.outbound_scid_alias()) } else { None }, + outbound_scid_alias: if context.is_usable() { + Some(context.outbound_scid_alias()) + } else { + None + }, inbound_scid_alias: context.latest_inbound_scid_alias(), channel_value_satoshis: context.get_value_satoshis(), feerate_sat_per_1000_weight: Some(context.get_feerate_sat_per_1000_weight()), -- 2.39.5