gossipd: don't discard node_announcements with old timestamps.

It really, really doesn't matter.  But we were dramatically reducing
our view of the network:

In my gossip_store (mainnet):
  channel_announcement: 30349
  channel_update: 55119
  node_announcment: 1783

Changelog-Fixed: No longer discard most node_announcements (fixes #3194)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-11-15 10:57:30 +10:30 committed by Christian Decker
parent d7609e61b5
commit fdd69af1f6

View File

@ -2414,14 +2414,6 @@ bool routing_add_node_announcement(struct routing_state *rstate,
status_debug("Received node_announcement for node %s",
type_to_string(tmpctx, struct node_id, &node_id));
/* Check timestamp is sane (unless from gossip_store). */
if (!index && !timestamp_reasonable(rstate, timestamp)) {
status_debug("Ignoring node_announcement timestamp %u for %s",
timestamp,
type_to_string(tmpctx, struct node_id, &node_id));
return false;
}
node = get_node(rstate, &node_id);
if (node == NULL || !node_has_broadcastable_channels(node)) {