X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannel_state.rs;h=4a08e4022e655aca24303e67991e5087831448da;hb=41b878e6dbe195285f5fc0639caaa19f362ef718;hp=776e742f3fecabb2e76ca982051238e21e6059a7;hpb=1f616c0058f77e074c429fa7fb8b2f4594cdb9ad;p=rust-lightning diff --git a/lightning/src/ln/channel_state.rs b/lightning/src/ln/channel_state.rs index 776e742f..4a08e402 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()),