mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
d8feec2197
The recent update to BOLT #4 includes failure message specifications, which are completely orthogonal to the normal ones. Don't include them in the gen_peer_wire_csv. This onion_defs.h file assumes we are using 2-byte failure codes as per the onion-failmsg-cleanup branch. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
19 lines
575 B
C
19 lines
575 B
C
/* Macro definitions for constants used in BOLT #4 */
|
|
#ifndef LIGHTNING_WIRE_ONION_DEFS_H
|
|
#define LIGHTNING_WIRE_ONION_DEFS_H
|
|
|
|
/* BOLT #4:
|
|
*
|
|
* The top byte of `failure-code` can be read as a set of flags:
|
|
* * 0x8000 (BADONION): unparsable onion, encrypted by previous node.
|
|
* * 0x4000 (PERM): permanent failure (otherwise transient)
|
|
* * 0x2000 (NODE): node failure (otherwise channel)
|
|
* * 0x1000 (UPDATE): new channel update enclosed
|
|
*/
|
|
#define BADONION 0x8000
|
|
#define PERM 0x4000
|
|
#define NODE 0x2000
|
|
#define UPDATE 0x1000
|
|
|
|
#endif /* LIGHTNING_WIRE_ONION_DEFS_H */
|