mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Fix consensus, SSZ, tree hash & run merge EF tests (#2622)
* Update to v1.1.0-beta.4 (squash of #2548) * SSZ, cached tree hash, EF tests
This commit is contained in:
committed by
Paul Hauner
parent
5687c56d51
commit
cce855f9ea
@@ -34,7 +34,7 @@ pub trait Handler {
|
||||
let fork_name_str = match fork_name {
|
||||
ForkName::Base => "phase0",
|
||||
ForkName::Altair => "altair",
|
||||
ForkName::Merge => "merge", // TODO: check this
|
||||
ForkName::Merge => "merge",
|
||||
};
|
||||
|
||||
let handler_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
@@ -145,6 +145,18 @@ impl<T, E> SszStaticHandler<T, E> {
|
||||
pub fn altair_only() -> Self {
|
||||
Self::for_forks(vec![ForkName::Altair])
|
||||
}
|
||||
|
||||
pub fn altair_and_later() -> Self {
|
||||
Self::for_forks(ForkName::list_all()[1..].to_vec())
|
||||
}
|
||||
|
||||
pub fn merge_only() -> Self {
|
||||
Self::for_forks(vec![ForkName::Merge])
|
||||
}
|
||||
|
||||
pub fn merge_and_later() -> Self {
|
||||
Self::for_forks(ForkName::list_all()[2..].to_vec())
|
||||
}
|
||||
}
|
||||
|
||||
/// Handler for SSZ types that implement `CachedTreeHash`.
|
||||
@@ -298,6 +310,11 @@ pub struct RandomHandler<E>(PhantomData<E>);
|
||||
impl<E: EthSpec + TypeName> Handler for RandomHandler<E> {
|
||||
type Case = cases::SanityBlocks<E>;
|
||||
|
||||
// FIXME(merge): enable merge tests once available
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
fork_name != ForkName::Merge
|
||||
}
|
||||
|
||||
fn config_name() -> &'static str {
|
||||
E::name()
|
||||
}
|
||||
@@ -481,6 +498,11 @@ pub struct GenesisValidityHandler<E>(PhantomData<E>);
|
||||
impl<E: EthSpec + TypeName> Handler for GenesisValidityHandler<E> {
|
||||
type Case = cases::GenesisValidity<E>;
|
||||
|
||||
// FIXME(merge): enable merge test once available
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
fork_name != ForkName::Merge
|
||||
}
|
||||
|
||||
fn config_name() -> &'static str {
|
||||
E::name()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user