Skip to content

Commit 6586287

Browse files
toadlyBroodlerustyrussell
authored andcommitted
BOLT 4: fix requested changes by @rustyrussell
1 parent c4c7723 commit 6586287

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

04-onion-routing.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ The processing node:
469469
- if the processing node does not have a peer with the matching address:
470470
- MUST drop the packet.
471471
- MUST signal a route failure.
472-
472+
473473
# Shared Secret
474474

475475
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:
704704
* [`2`:`len`]
705705
* [`len`:`channel_update`]
706706

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-
716707
1. type: PERM|15 (`unknown_payment_hash`)
717708

718709
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:
727718
2. data:
728719
* [`4`:`incoming_htlc_amt`]
729720

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+
730730
### Requirements
731731

732732
An _erring node_:
733733
- MUST select one of the above error codes when creating an error message.
734734
- MUST include the appropriate data for that particular error type.
735735
- 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.
737737

738738
Any _erring node_ MAY:
739739
- if the `realm` byte is unknown:
@@ -806,10 +806,10 @@ An _intermediate hop_ MUST NOT, but the _final node_:
806806
- MUST return a `final_expiry_too_soon` error.
807807
- if the `outgoing_cltv_value` does NOT correspond with the `cltv_expiry` from
808808
the final node's HTLC:
809-
- [FIXME: MAY|SHOULD|MUST?] return `final_incorrect_cltv_expiry` error.
809+
- MUST return `final_incorrect_cltv_expiry` error.
810810
- if the `amt_to_forward` is greater than the `incoming_htlc_amt` from the
811811
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.
813813

814814
## Receiving Failure Codes
815815

0 commit comments

Comments
 (0)