[][src]Struct solana::locktower::Locktower

pub struct Locktower { /* fields omitted */ }

Methods

impl Locktower[src]

pub fn new_from_forks(bank_forks: &BankForks, my_pubkey: &Pubkey) -> Self[src]

pub fn new(
    epoch_stakes: EpochStakes,
    threshold_depth: usize,
    threshold_size: f64
) -> Self
[src]

pub fn collect_vote_lockouts<F>(
    &self,
    bank_slot: u64,
    vote_accounts: F,
    ancestors: &HashMap<u64, HashSet<u64>>
) -> HashMap<u64, StakeLockout> where
    F: Iterator<Item = (Pubkey, (u64, Account))>, 
[src]

pub fn is_slot_confirmed(
    &self,
    slot: u64,
    lockouts: &HashMap<u64, StakeLockout>
) -> bool
[src]

pub fn is_recent_epoch(&self, bank: &Bank) -> bool[src]

pub fn update_epoch(&mut self, bank: &Bank)[src]

pub fn record_vote(&mut self, slot: u64, hash: Hash) -> Option<u64>[src]

pub fn recent_votes(&self) -> Vec<Vote>[src]

pub fn root(&self) -> Option<u64>[src]

pub fn calculate_weight(
    &self,
    stake_lockouts: &HashMap<u64, StakeLockout>
) -> u128
[src]

pub fn has_voted(&self, slot: u64) -> bool[src]

pub fn is_locked_out(
    &self,
    slot: u64,
    descendants: &HashMap<u64, HashSet<u64>>
) -> bool
[src]

pub fn check_vote_stake_threshold(
    &self,
    slot: u64,
    stake_lockouts: &HashMap<u64, StakeLockout>
) -> bool
[src]

Trait Implementations

impl Default for Locktower[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err