1
0
Fork 0
mirror of https://github.com/lightning/bolts.git synced 2025-03-10 17:18:44 +01:00

Clarify how to encode channel_update messages in onions

Apparently not all implementations implemented the onion encoding
the same, causing vastly differing onion failure packets. This
should unify them somewhat.

CC https://github.com/ElementsProject/lightning/issues/5154
This commit is contained in:
Matt Corallo 2022-04-15 17:13:54 +00:00 committed by Bastien Teinturier
parent 03468e1756
commit de8bb07a65

View file

@ -853,7 +853,8 @@ The top byte of `failure_code` can be read as a set of flags:
* 0x1000 (UPDATE): new channel update enclosed * 0x1000 (UPDATE): new channel update enclosed
Please note that the `channel_update` field is mandatory in messages whose Please note that the `channel_update` field is mandatory in messages whose
`failure_code` includes the `UPDATE` flag. `failure_code` includes the `UPDATE` flag. It is encoded *with* the message
type prefix, i.e. it will always start with `0x0102`.
The following `failure_code`s are defined: The following `failure_code`s are defined: