2018-03-22 11:36:25 +01:00
|
|
|
#ifndef LIGHTNING_GOSSIPD_BROADCAST_H
|
|
|
|
#define LIGHTNING_GOSSIPD_BROADCAST_H
|
2017-01-26 22:47:52 +01:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <ccan/list/list.h>
|
|
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
#include <ccan/tal/tal.h>
|
|
|
|
|
2019-04-10 09:31:29 +02:00
|
|
|
/* This is nested inside a node, chan or half_chan; rewriting the store can
|
|
|
|
* cause it to change! */
|
|
|
|
struct broadcastable {
|
|
|
|
/* This is also the offset within the gossip_store; even with 1M
|
|
|
|
* channels we still have a factor of 8 before this wraps. */
|
|
|
|
u32 index;
|
|
|
|
u32 timestamp;
|
2017-01-26 22:47:52 +01:00
|
|
|
};
|
|
|
|
|
2019-04-10 09:31:29 +02:00
|
|
|
static inline void broadcastable_init(struct broadcastable *bcast)
|
|
|
|
{
|
|
|
|
bcast->index = 0;
|
|
|
|
}
|
2018-03-22 11:36:25 +01:00
|
|
|
#endif /* LIGHTNING_GOSSIPD_BROADCAST_H */
|