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
2021-06-19 13:40:53 +01:00
committed by GitHub
parent 90d47870a9
commit 0417e4e37f
3 changed files with 63 additions and 55 deletions
@@ -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.