mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Remove 'WebStatic' seed_type since it was obsoleted a while ago (#1512)
This commit is contained in:
parent
77c2408c4e
commit
7a689d468c
3 changed files with 0 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -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<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
|
||||
/// for tests.
|
||||
pub fn predefined_seeds(addrs_str: Vec<String>) -> Box<Fn() -> Vec<SocketAddr> + Send> {
|
||||
|
|
|
@ -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!(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue