Skip to content

Commit

Permalink
visibility scope tweaks to aid seed test utilities (#3707)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume authored May 12, 2022
1 parent 145d819 commit 9d92f34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
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};

0 comments on commit 9d92f34

Please sign in to comment.