Struct solana_runtime::stakes::Stakes
source · pub struct Stakes { /* private fields */ }
Implementations§
source§impl Stakes
impl Stakes
pub fn history(&self) -> &StakeHistory
sourcepub fn vote_balance_and_staked(&self) -> u64
pub fn vote_balance_and_staked(&self) -> u64
Sum the lamports of the vote accounts and the delegated stake
pub fn remove_vote_account(&mut self, vote_pubkey: &Pubkey)
pub fn remove_stake_delegation(&mut self, stake_pubkey: &Pubkey)
pub fn update_vote_account(
&mut self,
vote_pubkey: &Pubkey,
new_vote_account: Option<VoteAccount>
)
pub fn update_stake_delegation(
&mut self,
stake_pubkey: &Pubkey,
new_delegation: Option<(u64, Delegation)>
)
pub fn vote_accounts(&self) -> &VoteAccounts
pub fn staked_nodes(&self) -> Arc<HashMap<Pubkey, u64>>
pub fn highest_staked_node(&self) -> Option<Pubkey>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Stakes
impl<'de> Deserialize<'de> for Stakes
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more