From 7a689d468c6c8dfdea4357b1bc72f4e94e923c75 Mon Sep 17 00:00:00 2001 From: Gary Yu Date: Wed, 12 Sep 2018 11:28:28 +0800 Subject: [PATCH] Remove 'WebStatic' seed_type since it was obsoleted a while ago (#1512) --- p2p/src/types.rs | 2 -- servers/src/grin/seed.rs | 16 ---------------- servers/src/grin/server.rs | 1 - 3 files changed, 19 deletions(-) diff --git a/p2p/src/types.rs b/p2p/src/types.rs index 69245cbe0..0918ddd4d 100644 --- a/p2p/src/types.rs +++ b/p2p/src/types.rs @@ -176,8 +176,6 @@ pub enum Seeding { None, /// A list of seed addresses provided to the server List, - /// Automatically download a text file with a list of server addresses - WebStatic, /// Automatically get a list of seeds from multiple DNS DNSSeed, /// Mostly for tests, where connections are initiated programmatically diff --git a/servers/src/grin/seed.rs b/servers/src/grin/seed.rs index 2c2365ae7..6d2a87a3c 100644 --- a/servers/src/grin/seed.rs +++ b/servers/src/grin/seed.rs @@ -32,7 +32,6 @@ use p2p; use pool::DandelionConfig; use util::LOGGER; -const SEEDS_URL: &'static str = "http://grin-tech.org/seeds.txt"; // DNS Seeds with contact email associated const DNS_SEEDS: &'static [&'static str] = &[ "t3.seed.grin-tech.org", // igno.peverell@protonmail.com @@ -366,21 +365,6 @@ pub fn dns_seeds() -> Box Vec + Send> { }) } -/// Extract the list of seeds from a pre-defined text file available through -/// http. Easy method until we have a set of DNS names we can rely on. -pub fn web_seeds() -> Box Vec + Send> { - Box::new(|| { - debug!(LOGGER, "Retrieving seed nodes from {}", SEEDS_URL); - let text: String = api::client::get(SEEDS_URL).expect("Failed to resolve seeds"); - let addrs = text - .split_whitespace() - .map(|s| s.parse().unwrap()) - .collect::>(); - debug!(LOGGER, "Retrieved seed addresses: {:?}", addrs); - addrs - }) -} - /// Convenience function when the seed list is immediately known. Mostly used /// for tests. pub fn predefined_seeds(addrs_str: Vec) -> Box Vec + Send> { diff --git a/servers/src/grin/server.rs b/servers/src/grin/server.rs index 483c5380e..9c5691082 100644 --- a/servers/src/grin/server.rs +++ b/servers/src/grin/server.rs @@ -213,7 +213,6 @@ impl Server { seed::predefined_seeds(config.p2p_config.seeds.as_mut().unwrap().clone()) } p2p::Seeding::DNSSeed => seed::dns_seeds(), - p2p::Seeding::WebStatic => seed::web_seeds(), _ => unreachable!(), };