mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Make BeaconState.balances a tree list!
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
use self::UpdatePattern::*;
|
||||
use crate::*;
|
||||
use ssz::{Decode, Encode};
|
||||
use tree_hash::TreeHash;
|
||||
use typenum::Unsigned;
|
||||
use types::VList;
|
||||
|
||||
@@ -56,7 +57,7 @@ pub trait Field<E: EthSpec>: Copy {
|
||||
/// The type of value stored in this field: the `T` from `FixedVector<T, N>`.
|
||||
///
|
||||
/// The `Default` impl will be used to fill extra vector entries.
|
||||
type Value: Decode + Encode + Default + Clone + PartialEq + std::fmt::Debug;
|
||||
type Value: TreeHash + Decode + Encode + Default + Clone + PartialEq + std::fmt::Debug;
|
||||
|
||||
/// The length of this field: the `N` from `FixedVector<T, N>`.
|
||||
type Length: Unsigned;
|
||||
|
||||
@@ -48,7 +48,7 @@ where
|
||||
|
||||
// Registry
|
||||
pub validators: VList<Validator, T::ValidatorRegistryLimit>,
|
||||
pub balances: VariableList<u64, T::ValidatorRegistryLimit>,
|
||||
pub balances: VList<u64, T::ValidatorRegistryLimit>,
|
||||
|
||||
// Shuffling
|
||||
/// Randao value from the current slot, for patching into the per-epoch randao vector.
|
||||
|
||||
Reference in New Issue
Block a user