File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3173,7 +3173,10 @@ impl<Signer: Sign> Channel<Signer> {
3173
3173
let buffer_fee_msat = Channel :: < Signer > :: commit_tx_fee_sat ( feerate_per_kw, commitment_stats. num_nondust_htlcs + outbound_stats. on_holder_tx_holding_cell_htlcs_count as usize + CONCURRENT_INBOUND_HTLC_FEE_BUFFER as usize ) * 1000 ;
3174
3174
let holder_balance_msat = commitment_stats. local_balance_msat - outbound_stats. holding_cell_msat ;
3175
3175
if holder_balance_msat < buffer_fee_msat + self . counterparty_selected_channel_reserve_satoshis . unwrap ( ) * 1000 {
3176
- //TODO: auto-close after a number of failures?
3176
+ // If we're failing affordance, start a autoclose timer as the situation is
3177
+ // likely unsafe due to a heavy-loaded channel, of which the feerate should
3178
+ // become less and less compelling.
3179
+ self . maybe_trigger_autoclose_timer ( self . get_feerate ( ) , feerate_per_kw, background_feerate) ;
3177
3180
log_debug ! ( logger, "Cannot afford to send new feerate at {}" , feerate_per_kw) ;
3178
3181
return None ;
3179
3182
}
You can’t perform that action at this time.
0 commit comments