Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
babe: add docs about lateness entry lifetime
  • Loading branch information
andresilva committed Apr 3, 2020
commit f79d79fa323176c7774b9ce3af99e82420c34197
5 changes: 5 additions & 0 deletions frame/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ decl_storage! {
Initialized get(fn initialized): Option<MaybeVrf>;

/// How late the current block is compared to its parent.
///
/// This entry is populated as part of block execution and is cleaned up
/// on block finalization. Querying this storage entry outside of block
/// execution context should always yield `None`.
Lateness get(fn lateness): Option<T::BlockNumber>;
}
add_extra_genesis {
Expand Down Expand Up @@ -194,6 +198,7 @@ decl_module! {
Self::deposit_vrf_output(&vrf_output);
}

// remove temporary "environment" entry from storage
Lateness::<T>::kill();
}
}
Expand Down