2017-03-15 10:43:03 +01:00
|
|
|
#ifndef LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
|
|
#define LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H
|
|
|
|
#include "config.h"
|
|
|
|
#include <bitcoin/pubkey.h>
|
2017-08-29 06:12:04 +02:00
|
|
|
#include <gossipd/routing.h>
|
2017-03-15 10:43:03 +01:00
|
|
|
|
|
|
|
struct gossip_getnodes_entry {
|
|
|
|
struct pubkey nodeid;
|
2018-01-16 20:44:32 +01:00
|
|
|
s64 last_timestamp; /* -1 means never: following fields ignored */
|
2017-10-23 06:17:38 +02:00
|
|
|
struct wireaddr *addresses;
|
2018-01-16 20:44:32 +01:00
|
|
|
u8 *alias;
|
|
|
|
u8 color[3];
|
2017-03-15 10:43:03 +01:00
|
|
|
};
|
|
|
|
|
2017-03-22 13:30:09 +01:00
|
|
|
struct gossip_getchannels_entry {
|
|
|
|
struct pubkey source, destination;
|
2018-03-05 23:52:26 +01:00
|
|
|
u64 satoshis;
|
2017-03-22 13:30:09 +01:00
|
|
|
bool active;
|
|
|
|
struct short_channel_id short_channel_id;
|
|
|
|
u16 flags;
|
2018-01-04 00:51:21 +01:00
|
|
|
bool public;
|
2017-09-01 06:18:54 +02:00
|
|
|
s64 last_update_timestamp; /* -1 means never */
|
|
|
|
/* These are only set if last_update_timestamp >= 0 */
|
|
|
|
u32 delay;
|
2017-09-01 06:18:54 +02:00
|
|
|
u32 base_fee_msat;
|
|
|
|
u32 fee_per_millionth;
|
2017-03-22 13:30:09 +01:00
|
|
|
};
|
|
|
|
|
2018-02-08 02:23:46 +01:00
|
|
|
struct gossip_getnodes_entry *
|
|
|
|
fromwire_gossip_getnodes_entry(const tal_t *ctx, const u8 **pptr, size_t *max);
|
2017-03-22 13:30:09 +01:00
|
|
|
void towire_gossip_getnodes_entry(u8 **pptr,
|
|
|
|
const struct gossip_getnodes_entry *entry);
|
2017-03-15 10:43:03 +01:00
|
|
|
|
2017-03-15 13:36:35 +01:00
|
|
|
void fromwire_route_hop(const u8 **pprt, size_t *max, struct route_hop *entry);
|
|
|
|
void towire_route_hop(u8 **pprt, const struct route_hop *entry);
|
|
|
|
|
2017-03-22 13:30:09 +01:00
|
|
|
void fromwire_gossip_getchannels_entry(const u8 **pptr, size_t *max,
|
|
|
|
struct gossip_getchannels_entry *entry);
|
|
|
|
void towire_gossip_getchannels_entry(
|
|
|
|
u8 **pptr, const struct gossip_getchannels_entry *entry);
|
|
|
|
|
2017-08-28 18:06:01 +02:00
|
|
|
#endif /* LIGHTNING_LIGHTNINGD_GOSSIP_MSG_H */
|