File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -110,21 +110,19 @@ fn subtract_addl_outputs(
110
110
// commitment transaction *before* checking whether the remote party's balance is enough to
111
111
// cover the total anchor sum.
112
112
113
- let local_balance_before_fee_msat = if is_outbound_from_holder {
114
- value_to_self_after_htlcs_msat
115
- . and_then ( |balance_msat| balance_msat. checked_sub ( total_anchors_sat * 1000 ) )
116
- } else {
117
- value_to_self_after_htlcs_msat
118
- } ;
119
-
120
- let remote_balance_before_fee_msat = if !is_outbound_from_holder {
121
- value_to_remote_after_htlcs_msat
122
- . and_then ( |balance_msat| balance_msat. checked_sub ( total_anchors_sat * 1000 ) )
113
+ if is_outbound_from_holder {
114
+ (
115
+ value_to_self_after_htlcs_msat
116
+ . and_then ( |balance_msat| balance_msat. checked_sub ( total_anchors_sat * 1000 ) ) ,
117
+ value_to_remote_after_htlcs_msat,
118
+ )
123
119
} else {
124
- value_to_remote_after_htlcs_msat
125
- } ;
126
-
127
- ( local_balance_before_fee_msat, remote_balance_before_fee_msat)
120
+ (
121
+ value_to_self_after_htlcs_msat,
122
+ value_to_remote_after_htlcs_msat
123
+ . and_then ( |balance_msat| balance_msat. checked_sub ( total_anchors_sat * 1000 ) ) ,
124
+ )
125
+ }
128
126
}
129
127
130
128
fn get_dust_buffer_feerate ( feerate_per_kw : u32 ) -> u32 {
You can’t perform that action at this time.
0 commit comments