mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Do not send negative unixtimes to relays, keep everything 2020 or newer.
This commit is contained in:
parent
359670cf99
commit
d400e4e2f3
@ -289,6 +289,11 @@ impl Minion {
|
|||||||
// propogation delay
|
// propogation delay
|
||||||
special_since -= overlap as i64;
|
special_since -= overlap as i64;
|
||||||
|
|
||||||
|
// Some relays don't like dates before 1970. Hell, we don't need anything before 2020:a
|
||||||
|
if special_since < 1577836800 {
|
||||||
|
special_since = 1577836800;
|
||||||
|
}
|
||||||
|
|
||||||
// For feed related events, don't look back more than one feed_chunk ago
|
// For feed related events, don't look back more than one feed_chunk ago
|
||||||
let one_feedchunk_ago = Unixtime::now().unwrap().0 - feed_chunk as i64;
|
let one_feedchunk_ago = Unixtime::now().unwrap().0 - feed_chunk as i64;
|
||||||
let feed_since = special_since.max(one_feedchunk_ago);
|
let feed_since = special_since.max(one_feedchunk_ago);
|
||||||
|
Loading…
Reference in New Issue
Block a user