Skip to main content

Module stakes

Module stakes 

Source
Expand description

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

Structs§

DeserializableStakes
Simplified, intermediate representation of Stakes<T>
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.

Functions§

serialize_stake_accounts_to_delegation_format