Skip to content

Commit 5ef88ce

Browse files
committed
Do not fail-backwards LocalAnnounced HTLCs upon force-close.
This is completely unsafe as we have provided the remote side with a commitment_signed which they can broadcast, including the HTLC transaction, and then could claim it on-chain after we've failed it backwards!
1 parent a55355e commit 5ef88ce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/ln/channel.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,10 +2551,7 @@ impl Channel {
25512551
}
25522552
}
25532553

2554-
for htlc in self.pending_outbound_htlcs.drain(..) {
2555-
if htlc.state == OutboundHTLCState::LocalAnnounced {
2556-
dropped_outbound_htlcs.push((htlc.source, htlc.payment_hash));
2557-
}
2554+
for _htlc in self.pending_outbound_htlcs.drain(..) {
25582555
//TODO: Do something with the remaining HTLCs
25592556
//(we need to have the ChannelManager monitor them so we can claim the inbound HTLCs
25602557
//which correspond)

0 commit comments

Comments
 (0)