Using name to prefix and separate node configs
This commit is contained in:
@@ -15,7 +15,7 @@ async fn main() {
|
||||
name: name.to_string(),
|
||||
};
|
||||
|
||||
let _ = init::init(home(), config);
|
||||
let _ = init::init(home(name), config);
|
||||
}
|
||||
Some(Commands::Run {}) => {
|
||||
let (mut bft_crdt, keys) = list_transaction_crdt::new();
|
||||
@@ -25,8 +25,9 @@ async fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
fn home() -> std::path::PathBuf {
|
||||
fn home(name: &String) -> std::path::PathBuf {
|
||||
let mut path = dirs::home_dir().unwrap();
|
||||
path.push(".side");
|
||||
path.push(name);
|
||||
path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user