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

@@ -32,7 +32,8 @@ const BABE_EPOCH_CHANGES_VERSION: &[u8] = b"babe_epoch_changes_version";
const BABE_EPOCH_CHANGES_KEY: &[u8] = b"babe_epoch_changes";
const BABE_EPOCH_CHANGES_CURRENT_VERSION: u32 = 2;
fn block_weight_key<H: Encode>(block_hash: H) -> Vec<u8> {
/// The aux storage key used to store the block weight of the given block hash.
pub fn block_weight_key<H: Encode>(block_hash: H) -> Vec<u8> {
(b"block_weight", block_hash).encode()
}