Add jit and caching args to ledger-tool (#15177) (#15178)

(cherry picked from commit 11b84cb870)

Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
mergify[bot]
2021-02-06 21:04:46 +00:00
committed by GitHub
parent 40e62c60d3
commit e4fe7dfbbd

View File

@ -742,6 +742,14 @@ fn main() {
.long("no-snapshot") .long("no-snapshot")
.takes_value(false) .takes_value(false)
.help("Do not start from a local snapshot if present"); .help("Do not start from a local snapshot if present");
let bpf_jit_arg = Arg::with_name("bpf_jit")
.long("bpf-jit")
.takes_value(false)
.help("Process with JIT instead of interpreter.");
let no_accounts_db_caching_arg = Arg::with_name("no_accounts_db_caching")
.long("no-accounts-db-caching")
.takes_value(false)
.help("Disables accounts-db caching");
let account_paths_arg = Arg::with_name("account_paths") let account_paths_arg = Arg::with_name("account_paths")
.long("accounts") .long("accounts")
.value_name("PATHS") .value_name("PATHS")
@ -999,6 +1007,8 @@ fn main() {
.arg(&account_paths_arg) .arg(&account_paths_arg)
.arg(&halt_at_slot_arg) .arg(&halt_at_slot_arg)
.arg(&hard_forks_arg) .arg(&hard_forks_arg)
.arg(&no_accounts_db_caching_arg)
.arg(&bpf_jit_arg)
.arg(&max_genesis_archive_unpacked_size_arg) .arg(&max_genesis_archive_unpacked_size_arg)
.arg( .arg(
Arg::with_name("skip_poh_verify") Arg::with_name("skip_poh_verify")
@ -1632,6 +1642,8 @@ fn main() {
dev_halt_at_slot: value_t!(arg_matches, "halt_at_slot", Slot).ok(), dev_halt_at_slot: value_t!(arg_matches, "halt_at_slot", Slot).ok(),
new_hard_forks: hardforks_of(arg_matches, "hard_forks"), new_hard_forks: hardforks_of(arg_matches, "hard_forks"),
poh_verify: !arg_matches.is_present("skip_poh_verify"), poh_verify: !arg_matches.is_present("skip_poh_verify"),
bpf_jit: arg_matches.is_present("bpf_jit"),
accounts_db_caching_enabled: !arg_matches.is_present("no_accounts_db_caching"),
..ProcessOptions::default() ..ProcessOptions::default()
}; };
let print_accounts_stats = arg_matches.is_present("print_accounts_stats"); let print_accounts_stats = arg_matches.is_present("print_accounts_stats");