Merge remote-tracking branch 'origin/unstable' into tree-states

This commit is contained in:
Michael Sproul
2022-11-30 14:14:17 +11:00
173 changed files with 6359 additions and 1655 deletions

View File

@@ -116,10 +116,9 @@ fn parse_client_config<E: EthSpec>(
cli_args: &ArgMatches,
_env: &Environment<E>,
) -> Result<ClientConfig, String> {
let mut client_config = ClientConfig {
data_dir: get_data_dir(cli_args),
..Default::default()
};
let mut client_config = ClientConfig::default();
client_config.set_data_dir(get_data_dir(cli_args));
if let Some(freezer_dir) = clap_utils::parse_optional(cli_args, "freezer-dir")? {
client_config.freezer_db_path = Some(freezer_dir);
@@ -327,7 +326,7 @@ pub fn migrate_db<E: EthSpec>(
migrate_schema::<Witness<SystemTimeSlotClock, CachingEth1Backend<E>, _, _, _>>(
db,
&client_config.get_data_dir(),
client_config.eth1.deposit_contract_deploy_block,
from,
to,
log,
@@ -360,7 +359,7 @@ pub fn prune_payloads<E: EthSpec>(
}
/// Run the database manager, returning an error string if the operation did not succeed.
pub fn run<T: EthSpec>(cli_args: &ArgMatches<'_>, mut env: Environment<T>) -> Result<(), String> {
pub fn run<T: EthSpec>(cli_args: &ArgMatches<'_>, env: Environment<T>) -> Result<(), String> {
let client_config = parse_client_config(cli_args, &env)?;
let context = env.core_context();
let log = context.log().clone();