add/update types

This commit is contained in:
realbigsean
2022-02-18 18:29:05 -07:00
parent ff145b986f
commit de44b300c0
23 changed files with 189 additions and 19 deletions

View File

@@ -78,5 +78,6 @@ pub fn previous_fork(fork_name: ForkName) -> ForkName {
ForkName::Base => ForkName::Base,
ForkName::Altair => ForkName::Base,
ForkName::Merge => ForkName::Altair, // TODO: Check this when tests are released..
ForkName::Dank => ForkName::Merge, // TODO: Check this when tests are released..
}
}

View File

@@ -278,6 +278,7 @@ impl<E: EthSpec, T: EpochTransition<E>> Case for EpochProcessing<E, T> {
}
// No phase0 tests for Altair and later.
ForkName::Altair | ForkName::Merge => T::name() != "participation_record_updates",
ForkName::Dank => false, // TODO: revisit when tests are out
}
}

View File

@@ -61,6 +61,7 @@ impl<E: EthSpec> Case for ForkTest<E> {
ForkName::Base => panic!("phase0 not supported"),
ForkName::Altair => upgrade_to_altair(&mut result_state, spec).map(|_| result_state),
ForkName::Merge => upgrade_to_bellatrix(&mut result_state, spec).map(|_| result_state),
ForkName::Dank => panic!("danksharding not supported"),
};
compare_beacon_state_results_without_caches(&mut result, &mut expected)

View File

@@ -42,6 +42,11 @@ impl<E: EthSpec> LoadCase for TransitionTest<E> {
spec.altair_fork_epoch = Some(Epoch::new(0));
spec.bellatrix_fork_epoch = Some(metadata.fork_epoch);
}
//TODO(sean): fix
ForkName::Dank => {
spec.altair_fork_epoch = Some(Epoch::new(0));
spec.bellatrix_fork_epoch = Some(metadata.fork_epoch);
}
}
// Load blocks