mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Update operations_pool for new BeaconStateTypes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::*;
|
||||
use fixed_len_vec::typenum::{Unsigned, U1024, U8, U8192};
|
||||
|
||||
pub trait BeaconStateTypes {
|
||||
pub trait BeaconStateTypes: Default {
|
||||
type ShardCount: Unsigned + Clone + Sync + Send;
|
||||
type SlotsPerHistoricalRoot: Unsigned + Clone + Sync + Send;
|
||||
type LatestRandaoMixesLength: Unsigned + Clone + Sync + Send;
|
||||
@@ -11,7 +11,7 @@ pub trait BeaconStateTypes {
|
||||
fn spec() -> ChainSpec;
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
pub struct FoundationStateTypes;
|
||||
|
||||
impl BeaconStateTypes for FoundationStateTypes {
|
||||
@@ -28,7 +28,7 @@ impl BeaconStateTypes for FoundationStateTypes {
|
||||
|
||||
pub type FoundationBeaconState = BeaconState<FoundationStateTypes>;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
pub struct FewValidatorsStateTypes;
|
||||
|
||||
impl BeaconStateTypes for FewValidatorsStateTypes {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::Hash256;
|
||||
use crate::*;
|
||||
|
||||
use crate::beacon_state::BeaconStateTypes;
|
||||
use fixed_len_vec::FixedLenVec;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -31,7 +30,6 @@ pub struct HistoricalBatch<T: BeaconStateTypes> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::beacon_state::beacon_state_types::FoundationStateTypes;
|
||||
|
||||
pub type FoundationHistoricalBatch = HistoricalBatch<FoundationStateTypes>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user