solana_runtime

Module stakes

Source
Expand description

Stakes serve as a cache of stake and vote accounts to derive node stakes

Structs§

Stakes
The generic type T is either Delegation or StakeAccount. Stakes<Delegation> is equivalent to the old code and is used for backward compatibility in crate::bank::BankFieldsToDeserialize. But banks cache Stakes<StakeAccount> which includes the entire stake account and StakeStateV2 deserialized from the account. Doing so, will remove the need to load the stake account from accounts-db when working with stake-delegations.

Enums§

Error
InvalidCacheEntryReason
SerdeStakesToStakeFormat
Wrapper struct with custom serialization to support serializing Stakes<StakeAccount> as Stakes<Stake> without doing an intermediate clone of the stake data.
StakesEnum