@@ -2758,52 +2758,52 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2758
2758
2759
2759
let mut pending_inbound_htlcs_value_msat = 0;
2760
2760
{
2761
- let counterparty_dust_limit_timeout_sat = htlc_timeout_dust_limit + context.counterparty_dust_limit_satoshis;
2762
- let holder_dust_limit_success_sat = htlc_success_dust_limit + context.holder_dust_limit_satoshis;
2763
- for ref htlc in context.pending_inbound_htlcs.iter() {
2764
- pending_inbound_htlcs_value_msat += htlc.amount_msat;
2765
- if htlc.amount_msat / 1000 < counterparty_dust_limit_timeout_sat {
2766
- on_counterparty_tx_dust_exposure_msat += htlc.amount_msat;
2767
- }
2768
- if htlc.amount_msat / 1000 < holder_dust_limit_success_sat {
2769
- on_holder_tx_dust_exposure_msat += htlc.amount_msat;
2761
+ let counterparty_dust_limit_timeout_sat = htlc_timeout_dust_limit + context.counterparty_dust_limit_satoshis;
2762
+ let holder_dust_limit_success_sat = htlc_success_dust_limit + context.holder_dust_limit_satoshis;
2763
+ for ref htlc in context.pending_inbound_htlcs.iter() {
2764
+ pending_inbound_htlcs_value_msat += htlc.amount_msat;
2765
+ if htlc.amount_msat / 1000 < counterparty_dust_limit_timeout_sat {
2766
+ on_counterparty_tx_dust_exposure_msat += htlc.amount_msat;
2767
+ }
2768
+ if htlc.amount_msat / 1000 < holder_dust_limit_success_sat {
2769
+ on_holder_tx_dust_exposure_msat += htlc.amount_msat;
2770
+ }
2770
2771
}
2771
2772
}
2772
- }
2773
2773
2774
2774
let mut pending_outbound_htlcs_value_msat = 0;
2775
2775
let mut outbound_holding_cell_msat = 0;
2776
2776
let mut on_holder_tx_outbound_holding_cell_htlcs_count = 0;
2777
2777
let mut pending_outbound_htlcs = self.pending_outbound_htlcs.len();
2778
2778
{
2779
- let counterparty_dust_limit_success_sat = htlc_success_dust_limit + context.counterparty_dust_limit_satoshis;
2780
- let holder_dust_limit_timeout_sat = htlc_timeout_dust_limit + context.holder_dust_limit_satoshis;
2781
- for ref htlc in context.pending_outbound_htlcs.iter() {
2782
- pending_outbound_htlcs_value_msat += htlc.amount_msat;
2783
- if htlc.amount_msat / 1000 < counterparty_dust_limit_success_sat {
2784
- on_counterparty_tx_dust_exposure_msat += htlc.amount_msat;
2785
- }
2786
- if htlc.amount_msat / 1000 < holder_dust_limit_timeout_sat {
2787
- on_holder_tx_dust_exposure_msat += htlc.amount_msat;
2779
+ let counterparty_dust_limit_success_sat = htlc_success_dust_limit + context.counterparty_dust_limit_satoshis;
2780
+ let holder_dust_limit_timeout_sat = htlc_timeout_dust_limit + context.holder_dust_limit_satoshis;
2781
+ for ref htlc in context.pending_outbound_htlcs.iter() {
2782
+ pending_outbound_htlcs_value_msat += htlc.amount_msat;
2783
+ if htlc.amount_msat / 1000 < counterparty_dust_limit_success_sat {
2784
+ on_counterparty_tx_dust_exposure_msat += htlc.amount_msat;
2785
+ }
2786
+ if htlc.amount_msat / 1000 < holder_dust_limit_timeout_sat {
2787
+ on_holder_tx_dust_exposure_msat += htlc.amount_msat;
2788
+ }
2788
2789
}
2789
- }
2790
2790
2791
- for update in context.holding_cell_htlc_updates.iter() {
2792
- if let &HTLCUpdateAwaitingACK::AddHTLC { ref amount_msat, .. } = update {
2793
- pending_outbound_htlcs += 1;
2794
- pending_outbound_htlcs_value_msat += amount_msat;
2795
- outbound_holding_cell_msat += amount_msat;
2796
- if *amount_msat / 1000 < counterparty_dust_limit_success_sat {
2797
- on_counterparty_tx_dust_exposure_msat += amount_msat;
2798
- }
2799
- if *amount_msat / 1000 < holder_dust_limit_timeout_sat {
2800
- on_holder_tx_dust_exposure_msat += amount_msat;
2801
- } else {
2802
- on_holder_tx_outbound_holding_cell_htlcs_count += 1;
2791
+ for update in context.holding_cell_htlc_updates.iter() {
2792
+ if let &HTLCUpdateAwaitingACK::AddHTLC { ref amount_msat, .. } = update {
2793
+ pending_outbound_htlcs += 1;
2794
+ pending_outbound_htlcs_value_msat += amount_msat;
2795
+ outbound_holding_cell_msat += amount_msat;
2796
+ if *amount_msat / 1000 < counterparty_dust_limit_success_sat {
2797
+ on_counterparty_tx_dust_exposure_msat += amount_msat;
2798
+ }
2799
+ if *amount_msat / 1000 < holder_dust_limit_timeout_sat {
2800
+ on_holder_tx_dust_exposure_msat += amount_msat;
2801
+ } else {
2802
+ on_holder_tx_outbound_holding_cell_htlcs_count += 1;
2803
+ }
2803
2804
}
2804
2805
}
2805
2806
}
2806
- }
2807
2807
2808
2808
HTLCStats {
2809
2809
pending_inbound_htlcs: self.pending_inbound_htlcs.len(),
0 commit comments