mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +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
3718c36c51
commit
ef6158f4ee
@@ -197,12 +197,17 @@ impl<T: EthSpec> PartialBeaconState<T> {
|
||||
let epoch = slot.epoch(T::slots_per_epoch());
|
||||
|
||||
if spec
|
||||
.altair_fork_epoch
|
||||
.map_or(true, |altair_epoch| epoch < altair_epoch)
|
||||
.merge_fork_epoch
|
||||
.map_or(false, |merge_epoch| epoch >= merge_epoch)
|
||||
{
|
||||
PartialBeaconStateMerge::from_ssz_bytes(bytes).map(Self::Merge)
|
||||
} else if spec
|
||||
.altair_fork_epoch
|
||||
.map_or(false, |altair_epoch| epoch >= altair_epoch)
|
||||
{
|
||||
PartialBeaconStateBase::from_ssz_bytes(bytes).map(Self::Base)
|
||||
} else {
|
||||
PartialBeaconStateAltair::from_ssz_bytes(bytes).map(Self::Altair)
|
||||
} else {
|
||||
PartialBeaconStateBase::from_ssz_bytes(bytes).map(Self::Base)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user