Kagome
Polkadot Runtime Engine in C++17
|
#include <babe_util.hpp>
Public Member Functions | |
virtual | ~BabeUtil ()=default |
virtual BabeSlotNumber | syncEpoch (std::function< std::tuple< BabeSlotNumber, bool >()> &&f)=0 |
virtual BabeSlotNumber | getCurrentSlot () const =0 |
virtual BabeTimePoint | slotStartTime (BabeSlotNumber slot) const =0 |
virtual BabeDuration | remainToStartOfSlot (BabeSlotNumber slot) const =0 |
virtual BabeTimePoint | slotFinishTime (BabeSlotNumber slot) const =0 |
virtual BabeDuration | remainToFinishOfSlot (BabeSlotNumber slot) const =0 |
virtual EpochNumber | slotToEpoch (BabeSlotNumber slot_number) const =0 |
virtual BabeSlotNumber | slotInEpoch (BabeSlotNumber slot_number) const =0 |
Auxiliary class to calculate epoch index by slot number. It needed as seperated class because to exclude mutual dependency blockchain mechanic and block production/validation.
Definition at line 19 of file babe_util.hpp.
|
virtualdefault |
|
pure virtual |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot_number} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
slot_number} |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.
|
pure virtual |
Init inner state by call {
f} | returning first block slot and flag if first block is already finalized |
Implemented in kagome::consensus::babe::BabeConfigRepositoryImpl.