per-peer-daemons: tie in gossip filter.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-09-06 15:39:36 +09:30
committed by Christian Decker
parent 5292f11818
commit c99906a9a9
13 changed files with 33 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
#include <ccan/fdpass/fdpass.h>
#include <common/crypto_sync.h>
#include <common/gossip_rcvd_filter.h>
#include <common/gossip_store.h>
#include <common/peer_failed.h>
#include <common/per_peer_state.h>
@@ -166,6 +167,7 @@ bool handle_peer_gossip_or_error(struct per_peer_state *pps,
if (handle_timestamp_filter(pps, msg))
return true;
else if (is_msg_for_gossipd(msg)) {
gossip_rcvd_filter_add(pps->grf, msg);
wire_sync_write(pps->gossip_fd, msg);
/* wire_sync_write takes, so don't take again. */
return true;