Skip to content

Commit 6dd6289

Browse files
Clarify decode_update_add_htlc_onion comment
Clearer phrasing
1 parent 47bcc18 commit 6dd6289

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,10 +1465,11 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
14651465

14661466
// OUR PAYMENT!
14671467
// final_expiry_too_soon
1468-
// We have to have some headroom to broadcast on chain if we have the preimage, so make sure we have at least
1469-
// HTLC_FAIL_BACK_BUFFER blocks to go.
1470-
// Also, ensure that, in the case of an unknown payment hash, our payment logic has enough time to fail the HTLC backward
1471-
// before our onchain logic triggers a channel closure (see HTLC_FAIL_BACK_BUFFER rational).
1468+
// We have to have some headroom to broadcast on chain if we have the preimage, so make sure
1469+
// we have at least HTLC_FAIL_BACK_BUFFER blocks to go.
1470+
// Also, ensure that, in the case of an unknown preimage for the received payment hash, our
1471+
// payment logic has enough time to fail the HTLC backward before our onchain logic triggers a
1472+
// channel closure (see HTLC_FAIL_BACK_BUFFER rationale).
14721473
if (msg.cltv_expiry as u64) <= self.best_block.read().unwrap().height() as u64 + HTLC_FAIL_BACK_BUFFER as u64 + 1 {
14731474
return_err!("The final CLTV expiry is too soon to handle", 17, &[0;0]);
14741475
}

0 commit comments

Comments
 (0)