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