From 92cc9dbd228d9d881cb825c14ed4deb49854cb6e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 13 Jul 2021 01:26:43 +0000 Subject: [PATCH] Use last_services to store if we ever connected Also drain to-test queue faster --- src/datastore.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.39.5