mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
4deb552fe9
We no longer have any experimental-only wire definitions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
#ifndef LIGHTNING_WIRE_PEER_WIRE_H
|
|
#define LIGHTNING_WIRE_PEER_WIRE_H
|
|
#include "config.h"
|
|
#include <stdbool.h>
|
|
|
|
#include <wire/peer_wiregen.h>
|
|
|
|
/* BOLT #1:
|
|
*
|
|
* A receiving node:
|
|
* - upon receiving a message of _odd_, unknown type:
|
|
* - MUST ignore the received message.
|
|
* - upon receiving a message of _even_, unknown type:
|
|
* - MUST close the connection.
|
|
* - MAY fail the channels.
|
|
*/
|
|
|
|
/* Return true if it's an unknown ODD message. cursor is a tal ptr. */
|
|
bool is_unknown_msg_discardable(const u8 *cursor);
|
|
/* Return true if it's a message for gossipd. */
|
|
bool is_msg_for_gossipd(const u8 *cursor);
|
|
/* Returns true if the message type should be treated as a custommsg */
|
|
bool peer_wire_is_internal(enum peer_wire type);
|
|
/* Extract channel_id from various packets, return true if possible. */
|
|
bool extract_channel_id(const u8 *in_pkt, struct channel_id *channel_id);
|
|
|
|
/* BOLT #2:
|
|
*
|
|
* Only the least-significant bit of `channel_flags` is currently
|
|
* defined: `announce_channel`. This indicates whether the initiator
|
|
* of the funding flow wishes to advertise this channel publicly to
|
|
* the network, as detailed within [BOLT #7]
|
|
*/
|
|
#define CHANNEL_FLAGS_ANNOUNCE_CHANNEL 1
|
|
#endif /* LIGHTNING_WIRE_PEER_WIRE_H */
|