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 authored and GitHub committed 2021-01-06 11:08:29 +00:00
1 parent 452244514a
commit dd4625a1e7
6 files changed
+88 -4

No files matched your search

+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,