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
pub fn next_leader_slot(
&self,
pubkey: &Pubkey,
current_slot: Slot,
bank: &Bank,
blockstore: Option<&Blockstore>,
max_slot_range: u64
) -> Option<(Slot, Slot)>
pub fn next_leader_slot(
&self,
pubkey: &Pubkey,
current_slot: Slot,
bank: &Bank,
blockstore: Option<&Blockstore>,
max_slot_range: u64
) -> Option<(Slot, Slot)>
Returns the (next slot, last slot) consecutive range of slots after the given current_slot that the given node will be leader.
Trait Implementations
Returns the “default value” for a type. Read more
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
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more