mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Update beacon_node to work w/ BeaconStateTypes
This commit is contained in:
@@ -12,6 +12,7 @@ pub trait BeaconStateTypes: 'static + Default + Sync + Send + Clone + Debug + Pa
|
||||
fn spec() -> ChainSpec;
|
||||
}
|
||||
|
||||
/// Ethereum Foundation specifications.
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
pub struct FoundationStateTypes;
|
||||
|
||||
@@ -45,3 +46,20 @@ impl BeaconStateTypes for FewValidatorsStateTypes {
|
||||
}
|
||||
|
||||
pub type FewValidatorsBeaconState = BeaconState<FewValidatorsStateTypes>;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
pub struct LighthouseTestnetStateTypes;
|
||||
|
||||
impl BeaconStateTypes for LighthouseTestnetStateTypes {
|
||||
type ShardCount = U8;
|
||||
type SlotsPerHistoricalRoot = U8192;
|
||||
type LatestRandaoMixesLength = U8192;
|
||||
type LatestActiveIndexRootsLength = U8192;
|
||||
type LatestSlashedExitLength = U8192;
|
||||
|
||||
fn spec() -> ChainSpec {
|
||||
ChainSpec::lighthouse_testnet()
|
||||
}
|
||||
}
|
||||
|
||||
pub type LighthouseTestnetBeaconState = BeaconState<LighthouseTestnetStateTypes>;
|
||||
|
||||
Reference in New Issue
Block a user