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
let channel_state = channel_state_lock.borrow_parts();
@@ -2150,9 +2151,12 @@ impl ChannelMessageHandler for ChannelManager {
2150
2151
}else{
2151
2152
for chan in channel_state.by_id{
2152
2153
if chan.1.get_their_node_id() == *their_node_id {
2153
-
//TODO: mark channel disabled (and maybe announce such after a timeout). Also
2154
-
//fail and wipe any uncommitted outbound HTLCs as those are considered after
2155
-
//reconnect.
2154
+
//TODO: mark channel disabled (and maybe announce such after a timeout).
2155
+
let failed_adds = chan.1.remove_uncommitted_htlcs();
2156
+
if !failed_adds.is_empty(){
2157
+
let chan_update = self.get_channel_update(&chan.1).map(|u| u.encode_with_len()).unwrap();// Cannot add/recv HTLCs before we have a short_id so unwrap is safe
2158
+
failed_payments.push((chan_update, failed_adds));
2159
+
}
2156
2160
}
2157
2161
}
2158
2162
}
@@ -2166,6 +2170,11 @@ impl ChannelMessageHandler for ChannelManager {
0 commit comments