mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
153b7bf192
connectd is the only one who uses these routines now. The rest can be linked into a plugin. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
28 lines
776 B
C
28 lines
776 B
C
#ifndef LIGHTNING_CONNECTD_GOSSIP_STORE_H
|
|
#define LIGHTNING_CONNECTD_GOSSIP_STORE_H
|
|
#include "config.h"
|
|
#include <common/gossip_store.h>
|
|
|
|
/**
|
|
* Direct store accessor: loads gossip msg from store.
|
|
*
|
|
* Returns NULL if there are no more gossip msgs.
|
|
* Updates *end if the known end of file has moved.
|
|
* Updates *gossip_store_fd if file has been compacted.
|
|
*/
|
|
u8 *gossip_store_next(const tal_t *ctx,
|
|
int *gossip_store_fd,
|
|
u32 timestamp_min, u32 timestamp_max,
|
|
bool push_only,
|
|
bool with_spam,
|
|
size_t *off, size_t *end);
|
|
|
|
/**
|
|
* Return offset of first entry >= this timestamp.
|
|
*/
|
|
size_t find_gossip_store_by_timestamp(int gossip_store_fd,
|
|
size_t off,
|
|
u32 timestamp);
|
|
|
|
#endif /* LIGHTNING_CONNECTD_GOSSIP_STORE_H */
|