mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 21:34:46 +00:00
Add progress on op pool test fixes
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
use crate::*;
|
||||
use fixed_len_vec::typenum::{Unsigned, U1024, U8, U8192};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::fmt::Debug;
|
||||
|
||||
pub trait BeaconStateTypes: 'static + Default + Sync + Send + Clone + Debug + PartialEq {
|
||||
pub trait BeaconStateTypes:
|
||||
'static + Default + Sync + Send + Clone + Debug + PartialEq + serde::de::DeserializeOwned
|
||||
{
|
||||
type ShardCount: Unsigned + Clone + Sync + Send + Debug + PartialEq;
|
||||
type SlotsPerHistoricalRoot: Unsigned + Clone + Sync + Send + Debug + PartialEq;
|
||||
type LatestRandaoMixesLength: Unsigned + Clone + Sync + Send + Debug + PartialEq;
|
||||
@@ -13,7 +16,7 @@ pub trait BeaconStateTypes: 'static + Default + Sync + Send + Clone + Debug + Pa
|
||||
}
|
||||
|
||||
/// Ethereum Foundation specifications.
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
#[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct FoundationStateTypes;
|
||||
|
||||
impl BeaconStateTypes for FoundationStateTypes {
|
||||
@@ -30,7 +33,7 @@ impl BeaconStateTypes for FoundationStateTypes {
|
||||
|
||||
pub type FoundationBeaconState = BeaconState<FoundationStateTypes>;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
#[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct FewValidatorsStateTypes;
|
||||
|
||||
impl BeaconStateTypes for FewValidatorsStateTypes {
|
||||
@@ -47,7 +50,7 @@ impl BeaconStateTypes for FewValidatorsStateTypes {
|
||||
|
||||
pub type FewValidatorsBeaconState = BeaconState<FewValidatorsStateTypes>;
|
||||
|
||||
#[derive(Clone, PartialEq, Debug, Default)]
|
||||
#[derive(Clone, PartialEq, Debug, Default, Serialize, Deserialize)]
|
||||
pub struct LighthouseTestnetStateTypes;
|
||||
|
||||
impl BeaconStateTypes for LighthouseTestnetStateTypes {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use super::{DepositData, Hash256, TreeHashVector};
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::*;
|
||||
use fixed_len_vec::typenum::U32;
|
||||
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -22,7 +23,7 @@ use tree_hash_derive::{CachedTreeHash, TreeHash};
|
||||
TestRandom,
|
||||
)]
|
||||
pub struct Deposit {
|
||||
pub proof: TreeHashVector<Hash256>,
|
||||
pub proof: FixedLenVec<Hash256, U32>,
|
||||
pub index: u64,
|
||||
pub deposit_data: DepositData,
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ pub mod pending_attestation;
|
||||
pub mod proposer_slashing;
|
||||
pub mod slashable_attestation;
|
||||
pub mod transfer;
|
||||
pub mod tree_hash_vector;
|
||||
// pub mod tree_hash_vector;
|
||||
pub mod voluntary_exit;
|
||||
#[macro_use]
|
||||
pub mod slot_epoch_macros;
|
||||
@@ -66,7 +66,7 @@ pub use crate::slashable_attestation::SlashableAttestation;
|
||||
pub use crate::slot_epoch::{Epoch, Slot};
|
||||
pub use crate::slot_height::SlotHeight;
|
||||
pub use crate::transfer::Transfer;
|
||||
pub use crate::tree_hash_vector::TreeHashVector;
|
||||
// pub use crate::tree_hash_vector::TreeHashVector;
|
||||
pub use crate::validator::Validator;
|
||||
pub use crate::voluntary_exit::VoluntaryExit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user