add options to create snapshot (#26095)

This commit is contained in:
Jeff Washington (jwash) 2022-06-21 14:07:05 -04:00 committed by GitHub
parent 3096b64f9d
commit 6513bb3b1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -1446,6 +1446,9 @@ fn main() {
.about("Create a new ledger snapshot")
.arg(&no_snapshot_arg)
.arg(&account_paths_arg)
.arg(&skip_rewrites_arg)
.arg(&accounts_db_skip_initial_hash_calc_arg)
.arg(&ancient_append_vecs)
.arg(&hard_forks_arg)
.arg(&max_genesis_archive_unpacked_size_arg)
.arg(&snapshot_version_arg)
@ -2424,6 +2427,14 @@ fn main() {
output_directory.display()
);
let accounts_db_config = Some(AccountsDbConfig {
skip_rewrites: arg_matches.is_present("accounts_db_skip_rewrites"),
ancient_append_vecs: arg_matches.is_present("accounts_db_ancient_append_vecs"),
skip_initial_hash_calc: arg_matches
.is_present("accounts_db_skip_initial_hash_calculation"),
..AccountsDbConfig::default()
});
match load_bank_forks(
arg_matches,
&genesis_config,
@ -2432,6 +2443,7 @@ fn main() {
new_hard_forks,
halt_at_slot: Some(snapshot_slot),
poh_verify: false,
accounts_db_config,
..ProcessOptions::default()
},
snapshot_archive_path,