@@ -469,7 +469,7 @@ The processing node:
469
469
- if the processing node does not have a peer with the matching address:
470
470
- MUST drop the packet.
471
471
- MUST signal a route failure.
472
-
472
+
473
473
# Shared Secret
474
474
475
475
The origin node performs ECDH with each hop of the route, in order to establish a secret.
@@ -704,15 +704,6 @@ The top byte of `failure_code` can be read as a set of flags:
704
704
* [ ` 2 ` :` len ` ]
705
705
* [ ` len ` :` channel_update ` ]
706
706
707
- 1 . type: 21 (` expiry_too_far ` )
708
-
709
- 1 . type: UPDATE|20 (` channel_disabled ` )
710
- 2 . data:
711
- * [ ` 2 ` : ` flags ` ]
712
- * [ ` 2 ` :` len ` ]
713
- * [ ` len ` :` channel_update ` ]
714
- [ FIXME: is it important that 20 and 21 remain in this order or can they be moved to end of list?]
715
-
716
707
1 . type: PERM|15 (` unknown_payment_hash ` )
717
708
718
709
1 . type: PERM|16 (` incorrect_payment_amount ` )
@@ -727,13 +718,22 @@ The top byte of `failure_code` can be read as a set of flags:
727
718
2 . data:
728
719
* [ ` 4 ` :` incoming_htlc_amt ` ]
729
720
721
+ 1 . type: UPDATE|20 (` channel_disabled ` )
722
+ 2 . data:
723
+ * [ ` 2 ` : ` flags ` ]
724
+ * [ ` 2 ` :` len ` ]
725
+ * [ ` len ` :` channel_update ` ]
726
+
727
+ 1 . type: 21 (` expiry_too_far ` )
728
+
729
+
730
730
### Requirements
731
731
732
732
An _ erring node_ :
733
733
- MUST select one of the above error codes when creating an error message.
734
734
- MUST include the appropriate data for that particular error type.
735
735
- if there is more than one error:
736
- - SHOULD select the first error it encounters from list above.
736
+ - SHOULD select the first error it encounters from the list above.
737
737
738
738
Any _ erring node_ MAY:
739
739
- if the ` realm ` byte is unknown:
@@ -806,10 +806,10 @@ An _intermediate hop_ MUST NOT, but the _final node_:
806
806
- MUST return a ` final_expiry_too_soon ` error.
807
807
- if the ` outgoing_cltv_value ` does NOT correspond with the ` cltv_expiry ` from
808
808
the final node's HTLC:
809
- - [ FIXME: MAY|SHOULD| MUST? ] return ` final_incorrect_cltv_expiry ` error.
809
+ - MUST return ` final_incorrect_cltv_expiry ` error.
810
810
- if the ` amt_to_forward ` is greater than the ` incoming_htlc_amt ` from the
811
811
final node's HTLC:
812
- - [ FIXME: MAY|SHOULD| MUST? ] return a ` final_incorrect_htlc_amount ` error.
812
+ - MUST return a ` final_incorrect_htlc_amount ` error.
813
813
814
814
## Receiving Failure Codes
815
815
0 commit comments