mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
settings: change default hostlist to .local/darkfi/CARGO_PKG_NAME
also update tests
This commit is contained in:
@@ -84,7 +84,9 @@ impl Default for Settings {
|
||||
fn default() -> Self {
|
||||
let version = option_env!("CARGO_PKG_VERSION").unwrap_or("0.0.0");
|
||||
let app_version = semver::Version::parse(version).unwrap();
|
||||
let hostlist = String::from("~/.config/darkfi/hostlist.tsv");
|
||||
// TODO: We don't have a cross-platform method for the app directory (.local/darkfi)
|
||||
// in util/path.rs currently.
|
||||
let hostlist = String::from(format!("~/.local/darkfi/{}/hostlist.tsv", env!("CARGO_PKG_NAME")));
|
||||
|
||||
Self {
|
||||
node_id: String::new(),
|
||||
|
||||
@@ -107,7 +107,7 @@ async fn hostlist_propagation(ex: Arc<Executor<'static>>) {
|
||||
//outbound_connect_timeout: 10,
|
||||
inbound_connections: usize::MAX,
|
||||
seeds: vec![],
|
||||
hostlist: String::from("~/.config/darkfi/seed.tsv"),
|
||||
hostlist: String::from("~/.local/darkfi/p2p-test/seed.tsv"),
|
||||
peers: vec![],
|
||||
allowed_transports: vec!["tcp".to_string()],
|
||||
node_id: "seed".to_string(),
|
||||
@@ -136,7 +136,7 @@ async fn hostlist_propagation(ex: Arc<Executor<'static>>) {
|
||||
//outbound_connect_timeout: 10,
|
||||
inbound_connections: usize::MAX,
|
||||
seeds: vec![seed_addr.clone()],
|
||||
hostlist: format!("~/.config/darkfi/hosts{}.tsv", i),
|
||||
hostlist: format!("~/.local/darkfi/p2p-test/hosts{}.tsv", i),
|
||||
peers,
|
||||
allowed_transports: vec!["tcp".to_string()],
|
||||
node_id: i.to_string(),
|
||||
|
||||
Reference in New Issue
Block a user