Skip to content

Commit 9117111

Browse files
committed
f rewrite comment again
1 parent 55b0e61 commit 9117111

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lightning/src/ln/channel.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3180,9 +3180,12 @@ impl<Signer: WriteableEcdsaChannelSigner> Channel<Signer> {
31803180
let mut reason = OutboundHTLCOutcome::Success(None);
31813181
mem::swap(outcome, &mut reason);
31823182
if let OutboundHTLCOutcome::Success(Some(preimage)) = reason {
3183-
// While failing to handle the `Success(None)` case here could result in
3184-
// forgetting some HTLC claims, it is only reachable for HTLCs claimed on LDK
3185-
// 0.0.104 or before, then upgrading LDK before the HTLC is fully resolved.
3183+
// If a user (a) receives an HTLC claim using LDK 0.0.104 or before, then (b)
3184+
// upgrades to LDK 0.0.114 or later before the HTLC is fully resolved, we could
3185+
// have a `Success(None)` reason. In this case we could forget some HTLC
3186+
// claims, but such an upgrade is unlikely and including claimed HTLCs here
3187+
// fixes a bug which the user was exposed to on 0.0.104 when they started the
3188+
// claim anyway.
31863189
claimed_htlcs.push((SentHTLCId::from_source(&htlc.source), preimage));
31873190
}
31883191
htlc.state = OutboundHTLCState::AwaitingRemoteRevokeToRemove(reason);

0 commit comments

Comments
 (0)