We don't check this when loading from the gossip_store: that would break * our canned tests, and usually old gossip is better than no gossip */
| 995 | /* We don't check this when loading from the gossip_store: that would break |
| 996 | * our canned tests, and usually old gossip is better than no gossip */ |
| 997 | static bool timestamp_reasonable(const struct daemon *daemon, u32 timestamp) |
| 998 | { |
| 999 | u64 now = clock_time().ts.tv_sec; |
| 1000 | |
| 1001 | /* More than one day ahead? */ |
| 1002 | if (timestamp > now + 24*60*60) |
| 1003 | return false; |
| 1004 | /* More than 2 weeks behind? */ |
| 1005 | if (timestamp < now - GOSSIP_PRUNE_INTERVAL(daemon->dev_fast_gossip_prune)) |
| 1006 | return false; |
| 1007 | return true; |
| 1008 | } |
| 1009 | |
| 1010 | const char *gossmap_manage_channel_update(const tal_t *ctx, |
| 1011 | struct gossmap_manage *gm, |
no test coverage detected