File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -2954,13 +2954,11 @@ impl<Signer: Sign> Channel<Signer> {
2954
2954
}
2955
2955
2956
2956
// Before to propose a feerate update, check that we can actually afford the new fee compare to the holder balance.
2957
- if let Some ( reserve) = self . counterparty_selected_channel_reserve_satoshis {
2958
- let num_htlcs = self . pending_inbound_htlcs . len ( ) + self . pending_outbound_htlcs . len ( ) ;
2959
- let total_fee = feerate_per_kw as u64 * ( COMMITMENT_TX_BASE_WEIGHT + ( num_htlcs as u64 ) * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ;
2960
- if self . value_to_self_msat / 1000 - total_fee < reserve {
2961
- log_debug ! ( logger, "Cannot afford to send new feerate at {}" , feerate_per_kw) ;
2962
- return None ;
2963
- }
2957
+ let num_htlcs = self . pending_inbound_htlcs . len ( ) + self . pending_outbound_htlcs . len ( ) ;
2958
+ let total_fee = feerate_per_kw as u64 * ( COMMITMENT_TX_BASE_WEIGHT + ( num_htlcs as u64 ) * COMMITMENT_TX_WEIGHT_PER_HTLC ) / 1000 ;
2959
+ if self . value_to_self_msat / 1000 - total_fee < self . counterparty_selected_channel_reserve_satoshis . unwrap ( ) {
2960
+ log_debug ! ( logger, "Cannot afford to send new feerate at {}" , feerate_per_kw) ;
2961
+ return None ;
2964
2962
}
2965
2963
2966
2964
if feerate_per_kw > self . get_dust_buffer_feerate ( None ) {
You can’t perform that action at this time.
0 commit comments