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
Copy file name to clipboardExpand all lines: src/ln/channelmanager.rs
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2149,16 +2149,23 @@ impl ChannelMessageHandler for ChannelManager {
2149
2149
}
2150
2150
});
2151
2151
}else{
2152
-
for chan inchannel_state.by_id{
2153
-
if chan.1.get_their_node_id() == *their_node_id {
2152
+
channel_state.by_id.retain(|_, chan|{
2153
+
if chan.get_their_node_id() == *their_node_id {
2154
2154
//TODO: mark channel disabled (and maybe announce such after a timeout).
2155
-
let failed_adds = chan.1.remove_uncommitted_htlcs();
2155
+
let failed_adds = chan.remove_uncommitted_htlcs();
2156
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
2157
+
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