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
1487
1509
/// after a PaymentReceived event, failing the HTLC back to its origin and freeing resources
1488
1510
/// along the path (including in our own channel on which we received it).
@@ -2769,7 +2791,6 @@ impl ChannelMessageHandler for ChannelManager {
2769
2791
log_debug!(self,"Marking channels with {} disconnected and generating channel_updates", log_pubkey!(their_node_id));
2770
2792
channel_state.by_id.retain(|_, chan| {
2771
2793
if chan.get_their_node_id() == *their_node_id {
2772
-
//TODO: mark channel disabled (and maybe announce such after a timeout).
2773
2794
let failed_adds = chan.remove_uncommitted_htlcs_and_mark_paused();
2774
2795
if !failed_adds.is_empty(){
2775
2796
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