#[repr(C)]
pub struct ValidatorStakeInfo { pub active_stake_lamports: u64, pub transient_stake_lamports: u64, pub last_update_epoch: u64, pub transient_seed_suffix_start: u64, pub transient_seed_suffix_end: u64, pub status: StakeStatus, pub vote_account_address: Pubkey, }
Expand description

Information about a validator in the pool

NOTE: ORDER IS VERY IMPORTANT HERE, PLEASE DO NOT RE-ORDER THE FIELDS UNLESS THERE’S AN EXTREMELY GOOD REASON.

To save on BPF instructions, the serialized bytes are reinterpreted with an unsafe pointer cast, which means that this structure cannot have any undeclared alignment-padding in its representation.

Fields

active_stake_lamports: u64

Amount of active stake delegated to this validator, minus the minimum required stake amount of rent-exemption + crate::MINIMUM_ACTIVE_STAKE (currently 0.001 SOL).

Note that if last_update_epoch does not match the current epoch then this field may not be accurate

transient_stake_lamports: u64

Amount of transient stake delegated to this validator

Note that if last_update_epoch does not match the current epoch then this field may not be accurate

last_update_epoch: u64

Last epoch the active and transient stake lamports fields were updated

transient_seed_suffix_start: u64

Start of the validator transient account seed suffixess

transient_seed_suffix_end: u64

End of the validator transient account seed suffixes

status: StakeStatus

Status of the validator stake account

vote_account_address: Pubkey

Validator vote account address

Implementations

Get the total lamports delegated to this validator (active and transient)

Performs a very cheap comparison, for checking if this validator stake info matches the vote account address

Performs a very cheap comparison, for checking if this validator stake info does not have active lamports equal to the given bytes

Performs a very cheap comparison, for checking if this validator stake info does not have lamports equal to the given bytes

Check that the validator stake info is valid

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Get the name of the type without brackets.

Recursively, using DFS, add type definitions required for this type. For primitive types this is an empty map. Type definition explains how to serialize/deserialize a type. Read more

Helper method to add a single type definition to the map.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The length, in bytes, of the packed representation

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.