mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 19:32:55 +00:00
Fix tree-states sub-epoch diffs (#5097)
This commit is contained in:
@@ -593,9 +593,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
Arg::with_name("slots-per-restore-point")
|
||||
.long("slots-per-restore-point")
|
||||
.value_name("SLOT_COUNT")
|
||||
.help("Specifies how often a freezer DB restore point should be stored. \
|
||||
Cannot be changed after initialization. \
|
||||
[default: 8192 (mainnet) or 64 (minimal)]")
|
||||
.help("Deprecated.")
|
||||
.takes_value(true)
|
||||
)
|
||||
.arg(
|
||||
|
||||
@@ -26,7 +26,6 @@ use std::num::NonZeroU16;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::FromStr;
|
||||
use std::time::Duration;
|
||||
use store::hdiff::HierarchyConfig;
|
||||
use types::{Checkpoint, Epoch, EthSpec, Hash256, PublicKeyBytes, GRAFFITI_BYTES_LEN};
|
||||
|
||||
/// Gets the fully-initialized global client.
|
||||
@@ -435,22 +434,8 @@ pub fn get_config<E: EthSpec>(
|
||||
client_config.store.epochs_per_state_diff = epochs_per_state_diff;
|
||||
}
|
||||
|
||||
if let Some(hierarchy_exponents) =
|
||||
clap_utils::parse_optional::<String>(cli_args, "hierarchy-exponents")?
|
||||
{
|
||||
let exponents = hierarchy_exponents
|
||||
.split(',')
|
||||
.map(|s| {
|
||||
s.parse()
|
||||
.map_err(|e| format!("invalid hierarchy-exponents: {e:?}"))
|
||||
})
|
||||
.collect::<Result<Vec<u8>, _>>()?;
|
||||
|
||||
if exponents.windows(2).any(|w| w[0] >= w[1]) {
|
||||
return Err("hierarchy-exponents must be in ascending order".to_string());
|
||||
}
|
||||
|
||||
client_config.store.hierarchy_config = HierarchyConfig { exponents };
|
||||
if let Some(hierarchy_config) = clap_utils::parse_optional(cli_args, "hierarchy-exponents")? {
|
||||
client_config.store.hierarchy_config = hierarchy_config;
|
||||
}
|
||||
|
||||
if let Some(epochs_per_migration) =
|
||||
|
||||
Reference in New Issue
Block a user