[][src]Struct types::validator::Validator

pub struct Validator {
    pub pubkey: PublicKey,
    pub withdrawal_credentials: Hash256,
    pub effective_balance: u64,
    pub slashed: bool,
    pub activation_eligibility_epoch: Epoch,
    pub activation_epoch: Epoch,
    pub exit_epoch: Epoch,
    pub withdrawable_epoch: Epoch,
}

Information about a BeaconChain validator.

Spec v0.8.0

Fields

pubkey: PublicKeywithdrawal_credentials: Hash256effective_balance: u64slashed: boolactivation_eligibility_epoch: Epochactivation_epoch: Epochexit_epoch: Epochwithdrawable_epoch: Epoch

Methods

impl Validator[src]

pub fn is_active_at(&self, epoch: Epoch) -> bool[src]

Returns true if the validator is considered active at some epoch.

pub fn is_slashable_at(&self, epoch: Epoch) -> bool[src]

Returns true if the validator is slashable at some epoch.

pub fn is_exited_at(&self, epoch: Epoch) -> bool[src]

Returns true if the validator is considered exited at some epoch.

pub fn is_withdrawable_at(&self, epoch: Epoch) -> bool[src]

Returns true if the validator is able to withdraw at some epoch.

Trait Implementations

impl TestRandom for Validator[src]

impl Default for Validator[src]

fn default() -> Self[src]

Yields a "default" Validator. Primarily used for testing.

impl Clone for Validator[src]

impl PartialEq<Validator> for Validator[src]

impl Debug for Validator[src]

impl TreeHash for Validator[src]

impl Serialize for Validator[src]

impl<'de> Deserialize<'de> for Validator[src]

impl Decode for Validator[src]

impl Encode for Validator[src]

impl CachedTreeHash<TreeHashCache> for Validator[src]

fn recalculate_tree_hash_root(
    &self,
    cache: &mut TreeHashCache
) -> Result<Hash256, Error>
[src]

Efficiently tree hash a Validator, assuming it was updated by a valid state transition.

Specifically, we assume that the pubkey and withdrawal_credentials fields are constant.

Auto Trait Implementations

impl Send for Validator

impl Unpin for Validator

impl Sync for Validator

impl UnwindSafe for Validator

impl RefUnwindSafe for Validator

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized