@@ -62,6 +62,7 @@ A node:
62
62
* [ Returning Errors] ( #returning-errors )
63
63
* [ Failure Messages] ( #failure-messages )
64
64
* [ Receiving Failure Codes] ( #receiving-failure-codes )
65
+ * [ ` max_htlc_cltv ` Selection] ( #max-htlc-cltv-selection )
65
66
* [ Test Vector] ( #test-vector )
66
67
* [ Returning Errors] ( #returning-errors )
67
68
* [ References] ( #references )
@@ -1325,7 +1326,7 @@ A _forwarding node_ MAY, but a _final node_ MUST NOT:
1325
1326
- report the ` cltv_expiry ` of the outgoing HTLC and the current channel setting for the outgoing
1326
1327
channel.
1327
1328
- return an ` incorrect_cltv_expiry ` error.
1328
- - if the ` cltv_expiry ` is unreasonably near the present:
1329
+ - if the ` cltv_expiry ` is more than ` max_htlc_cltv ` near the present:
1329
1330
- report the current channel setting for the outgoing channel.
1330
1331
- return an ` expiry_too_soon ` error.
1331
1332
- if the ` cltv_expiry ` is unreasonably far in the future:
@@ -1407,6 +1408,13 @@ The _origin node_:
1407
1408
- MAY use the data specified in the various failure types for debugging
1408
1409
purposes.
1409
1410
1411
+ ## ` max_htlc_cltv ` Selection
1412
+
1413
+ If the HTLC expires too far in the future, a forwarding node can return an ` expiry_too_far ` error.
1414
+
1415
+ This ` max_htlc_ctlv ` value is defined by default to be 2016 blocks, based on historical default
1416
+ deployed by Lightning implementations.
1417
+
1410
1418
# Test Vector
1411
1419
1412
1420
## Returning Errors
0 commit comments