babe: expose next epoch data (#7829)

* babe: expose next epoch data

* babe: add runtime api for next_epoch

* babe: avoid reading next authorities from storage unnecessarily

* babe: add notes about epoch duration constraints

* babe: guard against overflow

* babe: add test for fetching current and next epoch data
This commit is contained in:
André Silva
2021-01-06 11:08:29 +00:00
committed by GitHub
parent 452244514a
commit dd4625a1e7
6 changed files with 88 additions and 4 deletions
+1 -1
View File
@@ -295,7 +295,7 @@ pub fn start_era(era_index: EraIndex) {
assert_eq!(Staking::current_era(), Some(era_index));
}
pub fn make_pre_digest(
pub fn make_primary_pre_digest(
authority_index: sp_consensus_babe::AuthorityIndex,
slot_number: sp_consensus_babe::SlotNumber,
vrf_output: VRFOutput,