X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fdatastore.rs;fp=src%2Fdatastore.rs;h=0e6dea3350357632170d86ae3262c6d3e8180c82;hb=866152d7203c8f11a686d073a2c3f617f9131675;hp=2f0e9a82d96297b8e72e3df45d742068dd2e4821;hpb=b133f38bd61ba96876d1d8c31d606b6c812dbc61;p=dnsseed-rust diff --git a/src/datastore.rs b/src/datastore.rs index 2f0e9a8..0e6dea3 100644 --- a/src/datastore.rs +++ b/src/datastore.rs @@ -234,6 +234,7 @@ impl Store { } let nodes_future = File::open(store.clone() + "/nodes").and_then(|f| { + let start_time = Instant::now() - Duration::from_secs(60 * 60 * 24); let mut res = nodes_uninitd!(); let l = BufReader::new(f).lines(); for line_res in l { @@ -272,7 +273,7 @@ impl Store { } } } - res.state_next_scan[node.state.to_num() as usize].push((Instant::now(), sockaddr)); + res.state_next_scan[node.state.to_num() as usize].push((start_time, sockaddr)); res.nodes_to_state.insert(sockaddr, node); } future::ok(res)