From 908ade054578036ae9a272f9e27fee871f0585cf Mon Sep 17 00:00:00 2001 From: t-bast Date: Thu, 20 Oct 2022 15:31:20 +0200 Subject: [PATCH] Add final node outgoing cltv requirements Note that this depends on #1032 which clarifies the final node requirements for non-blinded payments. --- 04-onion-routing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04-onion-routing.md b/04-onion-routing.md index 59fd41143..3ad1bfcb8 100644 --- a/04-onion-routing.md +++ b/04-onion-routing.md @@ -314,6 +314,8 @@ The reader: - MUST return an error if the payload contains other tlv fields than `encrypted_recipient_data`, `current_blinding_point`, `amt_to_forward`, `outgoing_cltv_value` and `total_amount_msat`. - MUST return an error if `amt_to_forward` or `outgoing_cltv_value` are not present. - MUST return an error if `amt_to_forward` is below what it expects for the payment. + - MUST return an error if incoming `cltv_expiry` < `outgoing_cltv_value`. + - MUST return an error if incoming `cltv_expiry` < `current_block_height` + `min_final_cltv_expiry_delta`. - Otherwise (it is not part of a blinded route): - MUST return an error if `amt_to_forward` or `outgoing_cltv_value` are not present. - if it is not the final node: