Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bolt04: Add failure code for invalid payload.
The specification currently doesn't specify the case where the onion per-hop payload can't be correctly decoded. This is somewhat fine with the fixed frames because every field of the payload can always be interpreted as a numeric value from the input bytes, so it leads to application errors in upper layers when those values are actually interpreted (and we realize that for instance we have an invalid `short_channel_id` value). With variable-length tlv streams in the onion payloads, we will encounter decoding errors (duplicate tlv types, invalid ordering, etc) and the spec should define the failure code to use in that case.
- Loading branch information