babe: add comments to block weight and expose block_weight function (#9145)

* babe: add comments to block weight and expose block_weight function

* babe: expose function for block weight key
This commit is contained in:
André Silva authored and GitHub committed 2021-06-19 12:40:53 +00:00
1 parent 90d47870a9
commit 0417e4e37f
3 files changed
+63 -55

No files matched your search

@@ -88,7 +88,11 @@ pub type EquivocationProof<H> = sp_consensus_slots::EquivocationProof<H, Authori
// `Weight` types, since the metadata isn't able to disambiguate.
pub type BabeAuthorityWeight = u64;
/// The weight of a BABE block.
/// The cumulative weight of a BABE block, i.e. sum of block weights starting
/// at this block until the genesis block.
///
/// Primary blocks have a weight of 1 whereas secondary blocks have a weight
/// of 0 (regardless of whether they are plain or vrf secondary blocks).
pub type BabeBlockWeight = u32;
/// Make a VRF transcript from given randomness, slot number and epoch.