From: Matt Corallo Date: Tue, 13 Jul 2021 01:26:43 +0000 (+0000) Subject: Use last_services to store if we ever connected X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=92cc9dbd228d9d881cb825c14ed4deb49854cb6e;p=dnsseed-rust Use last_services to store if we ever connected Also drain to-test queue faster --- diff --git a/src/datastore.rs b/src/datastore.rs index c55e47d..04e377b 100644 --- a/src/datastore.rs +++ b/src/datastore.rs @@ -20,7 +20,7 @@ use regex::Regex; use crate::bgp_client::BGPClient; pub const SECS_PER_SCAN_RESULTS: u64 = 15; -const MAX_CONNS_PER_SEC_PER_STATUS: u64 = 30; +const MAX_CONNS_PER_SEC_PER_STATUS: u64 = 500; #[derive(Clone, Copy, Hash, PartialEq, Eq)] pub enum AddressState { @@ -444,7 +444,6 @@ impl Store { nodes.good_node_services[i].remove(&addr); } } - state_ref.last_services = (0, 0); if !state_ref.queued { nodes.state_next_scan[AddressState::WasGood.to_num() as usize].push(addr); state_ref.queued = true;