diff --git a/common/gossip_store.c b/common/gossip_store.c index 686b1f177..eba8a5ab0 100644 --- a/common/gossip_store.c +++ b/common/gossip_store.c @@ -53,6 +53,7 @@ static size_t reopen_gossip_store(int *gossip_store_fd, const u8 *msg) u8 *gossip_store_next(const tal_t *ctx, int *gossip_store_fd, u32 timestamp_min, u32 timestamp_max, + bool push_only, size_t *off, size_t *end) { u8 *msg = NULL; @@ -109,6 +110,8 @@ u8 *gossip_store_next(const tal_t *ctx, !timestamp_filter(timestamp_min, timestamp_max, timestamp)) { msg = tal_free(msg); + } else if (!push && push_only) { + msg = tal_free(msg); } } diff --git a/common/gossip_store.h b/common/gossip_store.h index b5d8fad19..8fa6ee145 100644 --- a/common/gossip_store.h +++ b/common/gossip_store.h @@ -46,6 +46,7 @@ struct gossip_hdr { u8 *gossip_store_next(const tal_t *ctx, int *gossip_store_fd, u32 timestamp_min, u32 timestamp_max, + bool push_only, size_t *off, size_t *end); /** diff --git a/connectd/multiplex.c b/connectd/multiplex.c index fafc326a9..8a94a33ee 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -367,6 +367,7 @@ again: msg = gossip_store_next(ctx, &peer->daemon->gossip_store_fd, peer->gs.timestamp_min, peer->gs.timestamp_max, + false, &peer->gs.off, &peer->daemon->gossip_store_end); /* Don't send back gossip they sent to us! */