Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility DNSSeed scope tweaks to aid seed test utilities #3707

Merged
merged 1 commit into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion p2p/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ mod peer;
mod peers;
mod protocol;
mod serv;
mod store;
pub mod store;
pub mod types;

pub use crate::conn::SEND_CHANNEL_CAP;
Expand Down
10 changes: 6 additions & 4 deletions servers/src/grin/seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ use crate::p2p::types::PeerAddr;
use crate::p2p::ChainAdapter;
use crate::util::StopState;

// DNS Seeds with contact email associated
const MAINNET_DNS_SEEDS: &[&str] = &[
/// DNS Seeds with contact email associated - Mainnet
pub const MAINNET_DNS_SEEDS: &[&str] = &[
"mainnet.seed.grin.icu", // [email protected]
"mainnet.seed.713.mw", // [email protected]
"mainnet.seed.grin.lesceller.com", // [email protected]
"mainnet.seed.grin.prokapi.com", // [email protected]
"grinseed.yeastplume.org", // [email protected]
"mainnet-seed.grinnode.live", // [email protected]
];
const TESTNET_DNS_SEEDS: &[&str] = &[
/// DNS Seeds with contact email associated - Testnet
pub const TESTNET_DNS_SEEDS: &[&str] = &[
"floonet.seed.grin.icu", // [email protected]
"floonet.seed.713.mw", // [email protected]
"floonet.seed.grin.lesceller.com", // [email protected]
Expand Down Expand Up @@ -393,7 +394,8 @@ pub fn default_dns_seeds() -> Box<dyn Fn() -> Vec<PeerAddr> + Send> {
})
}

fn resolve_dns_to_addrs(dns_records: &Vec<String>) -> Vec<PeerAddr> {
/// Convenience function to resolve dns addresses from DNS records
pub fn resolve_dns_to_addrs(dns_records: &Vec<String>) -> Vec<PeerAddr> {
let mut addresses: Vec<PeerAddr> = vec![];
for dns in dns_records {
debug!("Retrieving addresses from dns {}", dns);
Expand Down
2 changes: 2 additions & 0 deletions servers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub mod common;
mod grin;
mod mining;

pub use grin::seed::{resolve_dns_to_addrs, MAINNET_DNS_SEEDS, TESTNET_DNS_SEEDS};

pub use crate::common::stats::{DiffBlock, PeerStats, ServerStats, StratumStats, WorkerStats};
pub use crate::common::types::{ServerConfig, StratumServerConfig};
pub use crate::grin::server::{Server, ServerTxPool};