Deprecates --accounts-hash-interval-slots (#31987)
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
This commit is contained in:
parent
1bc101252c
commit
b8ed614bfc
|
@ -555,21 +555,6 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> {
|
|||
.hidden(hidden_unless_forced())
|
||||
.help("Disable reporting of OS disk statistics.")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("accounts-hash-interval-slots")
|
||||
.long("accounts-hash-interval-slots")
|
||||
.value_name("NUMBER")
|
||||
.takes_value(true)
|
||||
.default_value(&default_args.accounts_hash_interval_slots)
|
||||
.help("Number of slots between generating accounts hash.")
|
||||
.validator(|val| {
|
||||
if val.eq("0") {
|
||||
Err(String::from("Accounts hash interval cannot be zero"))
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("snapshot_version")
|
||||
.long("snapshot-version")
|
||||
|
@ -1730,6 +1715,18 @@ fn deprecated_arguments() -> Vec<DeprecatedArg> {
|
|||
.help("Enables faster starting of validators by skipping startup clean and shrink."),
|
||||
usage_warning: "Enabled by default",
|
||||
);
|
||||
add_arg!(Arg::with_name("accounts_hash_interval_slots")
|
||||
.long("accounts-hash-interval-slots")
|
||||
.value_name("NUMBER")
|
||||
.takes_value(true)
|
||||
.help("Number of slots between verifying accounts hash.")
|
||||
.validator(|val| {
|
||||
if val.eq("0") {
|
||||
Err(String::from("Accounts hash interval cannot be zero"))
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}));
|
||||
add_arg!(
|
||||
Arg::with_name("disable_quic_servers")
|
||||
.long("disable-quic-servers")
|
||||
|
@ -1894,7 +1891,6 @@ pub struct DefaultArgs {
|
|||
|
||||
pub contact_debug_interval: String,
|
||||
|
||||
pub accounts_hash_interval_slots: String,
|
||||
pub accounts_filler_count: String,
|
||||
pub accounts_filler_size: String,
|
||||
pub accountsdb_repl_threads: String,
|
||||
|
@ -1983,7 +1979,6 @@ impl DefaultArgs {
|
|||
max_snapshot_download_abort: MAX_SNAPSHOT_DOWNLOAD_ABORT.to_string(),
|
||||
snapshot_archive_format: DEFAULT_ARCHIVE_COMPRESSION.to_string(),
|
||||
contact_debug_interval: "120000".to_string(),
|
||||
accounts_hash_interval_slots: "100".to_string(),
|
||||
snapshot_version: SnapshotVersion::default(),
|
||||
rocksdb_shred_compaction: "level".to_string(),
|
||||
rocksdb_ledger_compression: "none".to_string(),
|
||||
|
|
|
@ -1547,8 +1547,12 @@ pub fn main() {
|
|||
packager_thread_niceness_adj: snapshot_packager_niceness_adj,
|
||||
};
|
||||
|
||||
validator_config.accounts_hash_interval_slots =
|
||||
value_t_or_exit!(matches, "accounts-hash-interval-slots", u64);
|
||||
// The accounts hash interval shall match the snapshot interval
|
||||
validator_config.accounts_hash_interval_slots = std::cmp::min(
|
||||
full_snapshot_archive_interval_slots,
|
||||
incremental_snapshot_archive_interval_slots,
|
||||
);
|
||||
|
||||
if !is_snapshot_config_valid(
|
||||
&validator_config.snapshot_config,
|
||||
validator_config.accounts_hash_interval_slots,
|
||||
|
|
Loading…
Reference in New Issue