Trait BlockSlot

Source
pub trait BlockSlot<T: Config> {
    // Required methods
    fn future_slot(block_number: BlockNumberFor<T>) -> Option<Slot>;
    fn slot_produced_after(to_check: Slot) -> Option<BlockNumberFor<T>>;
    fn current_slot() -> Slot;
}

Required Methods§

Source

fn future_slot(block_number: BlockNumberFor<T>) -> Option<Slot>

Returns the highest valid slot for the given block_number. Returns None if that block number is too far in the past, or too far in the future.

Source

fn slot_produced_after(to_check: Slot) -> Option<BlockNumberFor<T>>

Returns the latest block number whose slot is less than the given to_check slot

Source

fn current_slot() -> Slot

Returns the slot at the current block height

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§