Struct solana_vote_program::vote_state::VoteState[][src]

pub struct VoteState {
    pub node_pubkey: Pubkey,
    pub authorized_withdrawer: Pubkey,
    pub commission: u8,
    pub votes: VecDeque<Lockout>,
    pub root_slot: Option<Slot>,
    pub last_timestamp: BlockTimestamp,
    // some fields omitted
}

Fields

node_pubkey: Pubkey

the node that votes in this account

authorized_withdrawer: Pubkey

the signer for withdrawals

commission: u8

percentage (0-100) that represents what part of a rewards payout should be given to this VoteAccount

votes: VecDeque<Lockout>root_slot: Option<Slot>last_timestamp: BlockTimestamp

most recent timestamp submitted with a vote

Implementations

returns commission split as (voter_portion, staker_portion, was_split) tuple

if commission calculation is 100% one way or other, indicate with false for was_split

increment credits, record credits for last epoch if new epoch

“unchecked” functions used by tests and Tower

Number of “credits” owed to this account from the mining pool. Submit this VoteState to the Rewards program to trade credits for lamports.

Number of “credits” owed to this account from the mining pool on a per-epoch basis, starting from credits observed. Each tuple of (Epoch, u64, u64) is read as (epoch, credits, prev_credits), where credits for each epoch is credits - prev_credits; while redundant this makes calculating rewards over partial epochs nice and simple

Trait Implementations

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

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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)

recently added

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.