You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latency/peer disconnection may trigger us to mark as disabled
some of our channels. After some time, if channels are still
disabled we need to broadcast ChannelUpdate to inform other network
peers about the uselessness of these channels.
/// Indicates that the preimage for payment_hash is unknown or the received amount is incorrect
1491
1513
/// after a PaymentReceived event, failing the HTLC back to its origin and freeing resources
1492
1514
/// along the path (including in our own channel on which we received it).
@@ -2795,7 +2817,6 @@ impl<'a> ChannelMessageHandler for ChannelManager<'a> {
2795
2817
log_debug!(self,"Marking channels with {} disconnected and generating channel_updates", log_pubkey!(their_node_id));
2796
2818
channel_state.by_id.retain(|_, chan| {
2797
2819
if chan.get_their_node_id() == *their_node_id {
2798
-
//TODO: mark channel disabled (and maybe announce such after a timeout).
2799
2820
let failed_adds = chan.remove_uncommitted_htlcs_and_mark_paused();
2800
2821
if !failed_adds.is_empty(){
2801
2822
let chan_update = self.get_channel_update(&chan).map(|u| u.encode_with_len()).unwrap();// Cannot add/recv HTLCs before we have a short_id so unwrap is safe
0 commit comments