|
@@ -852,10 +852,19 @@ impl Hosts {
|
|
|
for (host, last_seen) in hosts {
|
|
for (host, last_seen) in hosts {
|
|
|
debug!(target: "net::hosts::check_addrs()", "Starting checks");
|
|
debug!(target: "net::hosts::check_addrs()", "Starting checks");
|
|
|
|
|
|
|
|
|
|
+ // Print a warning if we are trying to connect to a seed node in
|
|
|
|
|
+ // Outbound session. This shouldn't happen as we reject configured
|
|
|
|
|
+ // seed nodes from entering our hostlist in filter_addrs().
|
|
|
|
|
+ if self.settings.seeds.contains(&host) {
|
|
|
|
|
+ warn!(target: "net::hosts::check_addrs",
|
|
|
|
|
+ "Seed addr={} has entered the hostlist! Skipping",
|
|
|
|
|
+ host.clone());
|
|
|
|
|
+ continue
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if let Err(e) = self.try_register(host.clone(), HostState::Connect).await {
|
|
if let Err(e) = self.try_register(host.clone(), HostState::Connect).await {
|
|
|
debug!(target: "net::hosts::check_addrs", "Skipping addr={}, err={}",
|
|
debug!(target: "net::hosts::check_addrs", "Skipping addr={}, err={}",
|
|
|
host.clone(), e);
|
|
host.clone(), e);
|
|
|
-
|
|
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -991,6 +1000,13 @@ impl Hosts {
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Configured seeds should never enter the hostlist.
|
|
|
|
|
+ if self.settings.seeds.contains(addr_) {
|
|
|
|
|
+ debug!(target: "net::hosts::filter_addresses()",
|
|
|
|
|
+ "[{}] is a configured seed. Skipping", addr_);
|
|
|
|
|
+ continue
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Blacklist peers should never enter the hostlist.
|
|
// Blacklist peers should never enter the hostlist.
|
|
|
if self.container.contains(HostColor::Black as usize, addr_).await {
|
|
if self.container.contains(HostColor::Black as usize, addr_).await {
|
|
|
warn!(target: "net::hosts::filter_addresses()",
|
|
warn!(target: "net::hosts::filter_addresses()",
|