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 */
| 213 | /* We don't check this when loading from the gossip_store: that would break |
| 214 | * our canned tests, and usually old gossip is better than no gossip */ |
| 215 | static bool timestamp_reasonable(struct routing_state *rstate, u32 timestamp) |
| 216 | { |
| 217 | u64 now = gossip_time_now(rstate).ts.tv_sec; |
| 218 | |
| 219 | /* More than one day ahead? */ |
| 220 | if (timestamp > now + 24*60*60) |
| 221 | return false; |
| 222 | /* More than 2 weeks behind? */ |
| 223 | if (timestamp < now - GOSSIP_PRUNE_INTERVAL(rstate->dev_fast_gossip_prune)) |
| 224 | return false; |
| 225 | return true; |
| 226 | } |
| 227 | |
| 228 | #if DEVELOPER |
| 229 | static void memleak_help_routing_tables(struct htable *memtable, |
no test coverage detected