mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Remove support for database migrations prior to schema version v22 (#7332)
Remove deprecated database migrations prior to v22 along with v22 migration specific code.
This commit is contained in:
@@ -301,7 +301,6 @@ fn parse_migrate_config(migrate_config: &Migrate) -> Result<MigrateConfig, Strin
|
||||
pub fn migrate_db<E: EthSpec>(
|
||||
migrate_config: MigrateConfig,
|
||||
client_config: ClientConfig,
|
||||
mut genesis_state: BeaconState<E>,
|
||||
runtime_context: &RuntimeContext<E>,
|
||||
) -> Result<(), Error> {
|
||||
let spec = runtime_context.eth2_config.spec.clone();
|
||||
@@ -329,13 +328,7 @@ pub fn migrate_db<E: EthSpec>(
|
||||
"Migrating database schema"
|
||||
);
|
||||
|
||||
let genesis_state_root = genesis_state.canonical_root()?;
|
||||
migrate_schema::<Witness<SystemTimeSlotClock, CachingEth1Backend<E>, _, _, _>>(
|
||||
db,
|
||||
Some(genesis_state_root),
|
||||
from,
|
||||
to,
|
||||
)
|
||||
migrate_schema::<Witness<SystemTimeSlotClock, CachingEth1Backend<E>, _, _, _>>(db, from, to)
|
||||
}
|
||||
|
||||
pub fn prune_payloads<E: EthSpec>(
|
||||
@@ -487,8 +480,7 @@ pub fn run<E: EthSpec>(
|
||||
match &db_manager_config.subcommand {
|
||||
cli::DatabaseManagerSubcommand::Migrate(migrate_config) => {
|
||||
let migrate_config = parse_migrate_config(migrate_config)?;
|
||||
let genesis_state = get_genesis_state()?;
|
||||
migrate_db(migrate_config, client_config, genesis_state, &context).map_err(format_err)
|
||||
migrate_db(migrate_config, client_config, &context).map_err(format_err)
|
||||
}
|
||||
cli::DatabaseManagerSubcommand::Inspect(inspect_config) => {
|
||||
let inspect_config = parse_inspect_config(inspect_config)?;
|
||||
|
||||
Reference in New Issue
Block a user