From: Matt Corallo Date: Tue, 4 Jun 2024 01:13:40 +0000 (+0000) Subject: Reformat `channel_state.rs` to match rustfmt requirements X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=08599b818825e3980ba09ab3199b0c2eee6f8237;p=rust-lightning Reformat `channel_state.rs` to match rustfmt requirements --- 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()),