mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
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:
@@ -382,6 +382,10 @@ sp_api::decl_runtime_apis! {
|
||||
/// Returns information regarding the current epoch.
|
||||
fn current_epoch() -> Epoch;
|
||||
|
||||
/// Returns information regarding the next epoch (which was already
|
||||
/// previously announced).
|
||||
fn next_epoch() -> Epoch;
|
||||
|
||||
/// Generates a proof of key ownership for the given authority in the
|
||||
/// current epoch. An example usage of this module is coupled with the
|
||||
/// session historical module to prove that a given authority key is
|
||||
|
||||
Reference in New Issue
Block a user