pub fn construct_mortal_era(period: u64, current: u64) -> Era
Expand description
Mortal Era generation, from period and block number. From sp_runtime::generic::Era
, verbatim.
Create a new era based on a period (which should be a power of two between 4 and 65536 inclusive) and a block number on which it should start (or, for long periods, be shortly after the start).
If using Era
in the context of FRAME
runtime, make sure that period
does not exceed BlockHashCount
parameter passed to system
module, since that
prunes old blocks and renders transactions immediately invalid.