Skip to content

Commit 8e7b291

Browse files
Remove unnecessary todo
The ChannelMonitor already monitors the chain for counterparties revealing preimages, and will give the HTLCSources back to the ChannelManager for claiming. Thus it's unnecessary for the ChannelManager to monitor these HTLCs itself. See is_resolving_htlc_output: - if the counterparty broadcasted and then claimed one of the HTLCs we offered them, line 2015 is where the ChannelMonitor gives the ChannelManager the HTLC source - if we broadcasted and they claimed an HTLC we offered them, line 2025 is where the ChannelMonitor gives the ChannelManager the HTLC source
1 parent 9c7c3b9 commit 8e7b291

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4017,12 +4017,6 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
40174017
}
40184018
}
40194019

4020-
for _htlc in self.pending_outbound_htlcs.drain(..) {
4021-
//TODO: Do something with the remaining HTLCs
4022-
//(we need to have the ChannelManager monitor them so we can claim the inbound HTLCs
4023-
//which correspond)
4024-
}
4025-
40264020
self.channel_state = ChannelState::ShutdownComplete as u32;
40274021
self.update_time_counter += 1;
40284022
self.latest_monitor_update_id += 1;

0 commit comments

Comments
 (0)