Struct solana_ledger::leader_schedule_cache::LeaderScheduleCache[][src]

pub struct LeaderScheduleCache {
    pub cached_schedules: RwLock<(HashMap<Epoch, Arc<LeaderSchedule>>, VecDeque<u64>)>,
    // some fields omitted
}

Fields

cached_schedules: RwLock<(HashMap<Epoch, Arc<LeaderSchedule>>, VecDeque<u64>)>

Implementations

impl LeaderScheduleCache[src]

pub fn new_from_bank(bank: &Bank) -> Self[src]

pub fn new(epoch_schedule: EpochSchedule, root_bank: &Bank) -> Self[src]

pub fn set_max_schedules(&mut self, max_schedules: usize)[src]

pub fn max_schedules(&self) -> usize[src]

pub fn set_root(&self, root_bank: &Bank)[src]

pub fn slot_leader_at(&self, slot: Slot, bank: Option<&Bank>) -> Option<Pubkey>[src]

pub fn next_leader_slot(
    &self,
    pubkey: &Pubkey,
    current_slot: Slot,
    bank: &Bank,
    blockstore: Option<&Blockstore>,
    max_slot_range: u64
) -> Option<(Slot, Slot)>
[src]

Return the (next slot, last slot) after the given current_slot that the given node will be leader

pub fn set_fixed_leader_schedule(
    &mut self,
    fixed_schedule: Option<FixedSchedule>
)
[src]

Trait Implementations

impl Default for LeaderScheduleCache[src]

Auto Trait Implementations

impl RefUnwindSafe for LeaderScheduleCache

impl Send for LeaderScheduleCache

impl Sync for LeaderScheduleCache

impl Unpin for LeaderScheduleCache

impl UnwindSafe for LeaderScheduleCache

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]