[−][src]Struct solana_runtime::bank::EpochSchedule
Reasons a transaction might be rejected.
Fields
slots_per_epoch: u64
The maximum number of slots in each epoch.
stakers_slot_offset: u64
A number of slots before slot_index 0. Used to calculate finalized staked nodes.
first_normal_epoch: u64
basically: log2(slots_per_epoch)
first_normal_slot: u64
basically: 2.pow(first_normal_epoch)
Methods
impl EpochSchedule
[src]
pub fn new(slots_per_epoch: u64, stakers_slot_offset: u64, warmup: bool) -> Self
[src]
pub fn get_slots_in_epoch(&self, epoch: u64) -> u64
[src]
get the length of the given epoch (in slots)
pub fn get_stakers_epoch(&self, slot: u64) -> u64
[src]
get the epoch for which the given slot should save off information about stakers
pub fn get_epoch_and_slot_index(&self, slot: u64) -> (u64, u64)
[src]
get epoch and offset into the epoch for the given slot
Trait Implementations
impl Copy for EpochSchedule
[src]
impl PartialEq<EpochSchedule> for EpochSchedule
[src]
fn eq(&self, other: &EpochSchedule) -> bool
[src]
fn ne(&self, other: &EpochSchedule) -> bool
[src]
impl Default for EpochSchedule
[src]
fn default() -> EpochSchedule
[src]
impl Clone for EpochSchedule
[src]
fn clone(&self) -> EpochSchedule
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for EpochSchedule
[src]
impl Debug for EpochSchedule
[src]
Auto Trait Implementations
impl Send for EpochSchedule
impl Sync for EpochSchedule
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Same for T
type Output = T
Should always be Self
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,