2016-12-21 17:15:35 +01:00
|
|
|
#ifndef LIGHTNING_DAEMON_P2P_ANNOUNCE_H
|
|
|
|
#define LIGHTNING_DAEMON_P2P_ANNOUNCE_H
|
|
|
|
#include "config.h"
|
2017-01-26 22:47:52 +01:00
|
|
|
#include "daemon/broadcast.h"
|
2017-01-22 16:16:51 +01:00
|
|
|
#include "daemon/lightningd.h"
|
|
|
|
#include "daemon/routing.h"
|
2016-12-21 17:15:35 +01:00
|
|
|
#include "lightningd.h"
|
2017-01-04 04:39:20 +01:00
|
|
|
#include "wire/gen_peer_wire.h"
|
2016-12-21 17:15:35 +01:00
|
|
|
|
|
|
|
void setup_p2p_announce(struct lightningd_state *dstate);
|
|
|
|
|
|
|
|
/* Handlers for incoming messages */
|
2017-02-01 15:01:23 +01:00
|
|
|
void handle_channel_announcement(struct routing_state *rstate, const u8 *announce, size_t len);
|
|
|
|
void handle_channel_update(struct routing_state *rstate, const u8 *update, size_t len);
|
|
|
|
void handle_node_announcement(struct routing_state *rstate, const u8 *node, size_t len);
|
2016-12-21 17:15:35 +01:00
|
|
|
|
|
|
|
/* Used to announce the existence of a channel and the endpoints */
|
|
|
|
void announce_channel(struct lightningd_state *dstate, struct peer *peer);
|
|
|
|
|
|
|
|
#endif /* LIGHTNING_DAEMON_P2P_ANNOUNCE_H */
|