pub trait OnEraStart<AccountId> {
// Required methods
fn on_era_start(era: EraIndex, validators: &[AccountId]);
fn weight(validators: u32) -> Weight;
// Provided method
fn enabled() -> bool { ... }
}Expand description
Notified when a new era becomes active.
Required Methods§
Sourcefn on_era_start(era: EraIndex, validators: &[AccountId])
fn on_era_start(era: EraIndex, validators: &[AccountId])
Called once when era becomes active, with the validators elected for it.
Sourcefn weight(validators: u32) -> Weight
fn weight(validators: u32) -> Weight
Upper bound of the weight of Self::on_era_start for validators validators.
Provided Methods§
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.