add --accounts-index-path to be used by disk accounts index (#19710)
* add --accounts-index-paths to be used by disk accounts index * add multiple and default to help
This commit is contained in:
parent
320beb76f6
commit
5810568c65
|
@ -891,6 +891,16 @@ fn main() {
|
||||||
.value_name("PATHS")
|
.value_name("PATHS")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("Comma separated persistent accounts location");
|
.help("Comma separated persistent accounts location");
|
||||||
|
let accounts_index_path_arg = Arg::with_name("accounts_index_path")
|
||||||
|
.long("accounts-index-path")
|
||||||
|
.value_name("PATH")
|
||||||
|
.takes_value(true)
|
||||||
|
.multiple(true)
|
||||||
|
.help(
|
||||||
|
"Persistent accounts-index location. \
|
||||||
|
May be specified multiple times. \
|
||||||
|
[default: [ledger]/accounts_index]",
|
||||||
|
);
|
||||||
let accounts_db_test_hash_calculation_arg = Arg::with_name("accounts_db_test_hash_calculation")
|
let accounts_db_test_hash_calculation_arg = Arg::with_name("accounts_db_test_hash_calculation")
|
||||||
.long("accounts-db-test-hash-calculation")
|
.long("accounts-db-test-hash-calculation")
|
||||||
.help("Enable hash calculation test");
|
.help("Enable hash calculation test");
|
||||||
|
@ -1195,6 +1205,7 @@ fn main() {
|
||||||
.about("Verify the ledger")
|
.about("Verify the ledger")
|
||||||
.arg(&no_snapshot_arg)
|
.arg(&no_snapshot_arg)
|
||||||
.arg(&account_paths_arg)
|
.arg(&account_paths_arg)
|
||||||
|
.arg(&accounts_index_path_arg)
|
||||||
.arg(&halt_at_slot_arg)
|
.arg(&halt_at_slot_arg)
|
||||||
.arg(&limit_load_slot_count_from_snapshot_arg)
|
.arg(&limit_load_slot_count_from_snapshot_arg)
|
||||||
.arg(&accounts_index_bins)
|
.arg(&accounts_index_bins)
|
||||||
|
@ -1925,7 +1936,15 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut accounts_index_paths = vec![]; // will be option
|
let mut accounts_index_paths: Vec<PathBuf> =
|
||||||
|
if arg_matches.is_present("accounts_index_path") {
|
||||||
|
values_t_or_exit!(arg_matches, "accounts_index_path", String)
|
||||||
|
.into_iter()
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.collect()
|
||||||
|
} else {
|
||||||
|
vec![]
|
||||||
|
};
|
||||||
if accounts_index_paths.is_empty() {
|
if accounts_index_paths.is_empty() {
|
||||||
accounts_index_paths = vec![ledger_path.join("accounts_index")];
|
accounts_index_paths = vec![ledger_path.join("accounts_index")];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2011,6 +2011,16 @@ pub fn main() {
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("Number of bins to divide the accounts index into"),
|
.help("Number of bins to divide the accounts index into"),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("accounts_index_path")
|
||||||
|
.long("accounts-index-path")
|
||||||
|
.value_name("PATH")
|
||||||
|
.takes_value(true)
|
||||||
|
.multiple(true)
|
||||||
|
.help("Persistent accounts-index location. \
|
||||||
|
May be specified multiple times. \
|
||||||
|
[default: [ledger]/accounts_index]"),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("accounts_db_test_hash_calculation")
|
Arg::with_name("accounts_db_test_hash_calculation")
|
||||||
.long("accounts-db-test-hash-calculation")
|
.long("accounts-db-test-hash-calculation")
|
||||||
|
@ -2530,7 +2540,14 @@ pub fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut accounts_index_paths = vec![]; // will be option soon
|
let mut accounts_index_paths: Vec<PathBuf> = if matches.is_present("accounts_index_path") {
|
||||||
|
values_t_or_exit!(matches, "accounts_index_path", String)
|
||||||
|
.into_iter()
|
||||||
|
.map(PathBuf::from)
|
||||||
|
.collect()
|
||||||
|
} else {
|
||||||
|
vec![]
|
||||||
|
};
|
||||||
if accounts_index_paths.is_empty() {
|
if accounts_index_paths.is_empty() {
|
||||||
accounts_index_paths = vec![ledger_path.join("accounts_index")];
|
accounts_index_paths = vec![ledger_path.join("accounts_index")];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue