Skip to content

Commit f4a4b50

Browse files
committed
f update comment
1 parent a74640f commit f4a4b50

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,10 +4284,14 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
42844284
};
42854285
debug_assert!(!sources.is_empty());
42864286

4287-
// If we are claiming an MPP payment, we have to take special care to ensure that each
4288-
// channel exists before claiming all of the payments (inside one lock).
4289-
// Note that channel existance is sufficient as we should always get a monitor update
4290-
// which will take care of the real HTLC claim enforcement.
4287+
// If we are claiming an MPP payment, we check that all channels which contain a claimable
4288+
// HTLC still exist. While this isn't guaranteed to remain true if a channel closes while
4289+
// we're claiming (or even after we claim, before the commitment update dance completes),
4290+
// it should be a relatively rare race, and we'd rather not claim HTLCs that require us to
4291+
// go on-chain (and lose the on-chain fee to do so) than just reject the payment.
4292+
//
4293+
// Note that we'll still always get our funds - as long as the generated
4294+
// `ChannelMonitorUpdate` makes it out to the relevant monitor we can claim on-chain.
42914295
//
42924296
// If we find an HTLC which we would need to claim but for which we do not have a
42934297
// channel, we will fail all parts of the MPP payment. While we could wait and see if

0 commit comments

Comments
 (0)