Fix semantic Deneb <> tree-states conflicts

This commit is contained in:
Michael Sproul
2023-10-03 16:07:25 +11:00
parent 109c4a5d17
commit 9446fc88ed
20 changed files with 165 additions and 187 deletions

View File

@@ -1,5 +1,7 @@
use std::mem;
use types::{BeaconState, BeaconStateDeneb, BeaconStateError as Error, ChainSpec, EthSpec, Fork};
use types::{
BeaconState, BeaconStateDeneb, BeaconStateError as Error, ChainSpec, EpochCache, EthSpec, Fork,
};
/// Transform a `Capella` state into an `Deneb` state.
pub fn upgrade_to_deneb<E: EthSpec>(
@@ -67,7 +69,8 @@ pub fn upgrade_to_deneb<E: EthSpec>(
committee_caches: mem::take(&mut pre.committee_caches),
pubkey_cache: mem::take(&mut pre.pubkey_cache),
exit_cache: mem::take(&mut pre.exit_cache),
tree_hash_cache: mem::take(&mut pre.tree_hash_cache),
slashings_cache: mem::take(&mut pre.slashings_cache),
epoch_cache: EpochCache::default(),
});
*pre_state = post;