Remove 'WebStatic' seed_type since it was obsoleted a while ago (#1512)

This commit is contained in:
Gary Yu 2018-09-12 11:28:28 +08:00 committed by Ignotus Peverell
parent 77c2408c4e
commit 7a689d468c
3 changed files with 0 additions and 19 deletions

View file

@ -176,8 +176,6 @@ pub enum Seeding {
None, None,
/// A list of seed addresses provided to the server /// A list of seed addresses provided to the server
List, List,
/// Automatically download a text file with a list of server addresses
WebStatic,
/// Automatically get a list of seeds from multiple DNS /// Automatically get a list of seeds from multiple DNS
DNSSeed, DNSSeed,
/// Mostly for tests, where connections are initiated programmatically /// Mostly for tests, where connections are initiated programmatically

View file

@ -32,7 +32,6 @@ use p2p;
use pool::DandelionConfig; use pool::DandelionConfig;
use util::LOGGER; use util::LOGGER;
const SEEDS_URL: &'static str = "http://grin-tech.org/seeds.txt";
// DNS Seeds with contact email associated // DNS Seeds with contact email associated
const DNS_SEEDS: &'static [&'static str] = &[ const DNS_SEEDS: &'static [&'static str] = &[
"t3.seed.grin-tech.org", // igno.peverell@protonmail.com "t3.seed.grin-tech.org", // igno.peverell@protonmail.com
@ -366,21 +365,6 @@ pub fn dns_seeds() -> Box<Fn() -> Vec<SocketAddr> + 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<Fn() -> Vec<SocketAddr> + 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::<Vec<_>>();
debug!(LOGGER, "Retrieved seed addresses: {:?}", addrs);
addrs
})
}
/// Convenience function when the seed list is immediately known. Mostly used /// Convenience function when the seed list is immediately known. Mostly used
/// for tests. /// for tests.
pub fn predefined_seeds(addrs_str: Vec<String>) -> Box<Fn() -> Vec<SocketAddr> + Send> { pub fn predefined_seeds(addrs_str: Vec<String>) -> Box<Fn() -> Vec<SocketAddr> + Send> {

View file

@ -213,7 +213,6 @@ impl Server {
seed::predefined_seeds(config.p2p_config.seeds.as_mut().unwrap().clone()) seed::predefined_seeds(config.p2p_config.seeds.as_mut().unwrap().clone())
} }
p2p::Seeding::DNSSeed => seed::dns_seeds(), p2p::Seeding::DNSSeed => seed::dns_seeds(),
p2p::Seeding::WebStatic => seed::web_seeds(),
_ => unreachable!(), _ => unreachable!(),
}; };