Allow multiple --accounts arguments
This commit is contained in:
parent
57b03c5bc1
commit
8082a2454c
|
@ -1008,6 +1008,7 @@ pub fn main() {
|
||||||
.long("accounts")
|
.long("accounts")
|
||||||
.value_name("PATHS")
|
.value_name("PATHS")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
|
.multiple(true)
|
||||||
.help("Comma separated persistent accounts location"),
|
.help("Comma separated persistent accounts location"),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -1529,11 +1530,16 @@ pub fn main() {
|
||||||
solana_net_utils::parse_port_range(matches.value_of("dynamic_port_range").unwrap())
|
solana_net_utils::parse_port_range(matches.value_of("dynamic_port_range").unwrap())
|
||||||
.expect("invalid dynamic_port_range");
|
.expect("invalid dynamic_port_range");
|
||||||
|
|
||||||
let account_paths = if let Some(account_paths) = matches.value_of("account_paths") {
|
let account_paths: Vec<PathBuf> =
|
||||||
account_paths.split(',').map(PathBuf::from).collect()
|
if let Ok(account_paths) = values_t!(matches, "account_paths", String) {
|
||||||
} else {
|
account_paths
|
||||||
vec![ledger_path.join("accounts")]
|
.join(",")
|
||||||
};
|
.split(',')
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.collect()
|
||||||
|
} else {
|
||||||
|
vec![ledger_path.join("accounts")]
|
||||||
|
};
|
||||||
|
|
||||||
// Create and canonicalize account paths to avoid issues with symlink creation
|
// Create and canonicalize account paths to avoid issues with symlink creation
|
||||||
validator_config.account_paths = account_paths
|
validator_config.account_paths = account_paths
|
||||||
|
|
Loading…
Reference in New Issue