]> git.bitcoin.ninja Git - dnsseed-rust/commitdiff
Use last_services to store if we ever connected
authorMatt Corallo <git@bluematt.me>
Tue, 13 Jul 2021 01:26:43 +0000 (01:26 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 13 Jul 2021 15:44:32 +0000 (15:44 +0000)
Also drain to-test queue faster

src/datastore.rs

index c55e47d93cfb1b59d253a583ebdd611f5b4780d3..04e377be126d61e8be93f3dc558dd6cf7affe0c7 100644 (file)
@@ -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;