pub trait EraInfoProvider {
type AccountId;
// Required methods
fn active_era() -> Option<EraIndex>;
fn current_era() -> Option<EraIndex>;
fn era_start_session_index(era: EraIndex) -> Option<SessionIndex>;
fn sessions_per_era() -> SessionIndex;
fn elected_validators(era: EraIndex) -> Vec<Self::AccountId>;
}
Required Associated Types§
Required Methods§
sourcefn active_era() -> Option<EraIndex>
fn active_era() -> Option<EraIndex>
Returns Some(idx)
where idx is the active era index otherwise
if no era is active returns None
.
sourcefn current_era() -> Option<EraIndex>
fn current_era() -> Option<EraIndex>
Returns Some(idx)
where idx is the current era index which is latest
planed era otherwise if no era has started returns None
.
sourcefn era_start_session_index(era: EraIndex) -> Option<SessionIndex>
fn era_start_session_index(era: EraIndex) -> Option<SessionIndex>
Returns the index of the starting session of the era
if possible. Otherwise returns None
.
sourcefn sessions_per_era() -> SessionIndex
fn sessions_per_era() -> SessionIndex
Returns how many sessions are in single era.
sourcefn elected_validators(era: EraIndex) -> Vec<Self::AccountId>
fn elected_validators(era: EraIndex) -> Vec<Self::AccountId>
Returns the elected authorities for provided era.
Object Safety§
This trait is not object safe.