Added bls_to_execution_changes to PersistedOpPool (#3857)

* Added bls_to_execution_changes to PersistedOpPool
This commit is contained in:
ethDreamer
2023-01-08 19:38:02 -06:00
committed by GitHub
parent cb94f639b0
commit 11f4784ae6
6 changed files with 146 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
//! Utilities for managing database schema changes.
mod migration_schema_v12;
mod migration_schema_v13;
mod migration_schema_v14;
use crate::beacon_chain::{BeaconChainTypes, ETH1_CACHE_DB_KEY};
use crate::eth1_chain::SszEth1;
@@ -114,6 +115,14 @@ pub fn migrate_schema<T: BeaconChainTypes>(
Ok(())
}
(SchemaVersion(13), SchemaVersion(14)) => {
let ops = migration_schema_v14::upgrade_to_v14::<T>(db.clone(), log)?;
db.store_schema_version_atomically(to, ops)
}
(SchemaVersion(14), SchemaVersion(13)) => {
let ops = migration_schema_v14::downgrade_from_v14::<T>(db.clone(), log)?;
db.store_schema_version_atomically(to, ops)
}
// Anything else is an error.
(_, _) => Err(HotColdDBError::UnsupportedSchemaVersion {
target_version: to,