* Move create_inherent_data call to use side * Make provide_inherent_data async * Fix tests * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Log errors * Fix test * Fix test * fix * Deduplicate test code * fix * flag * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Revert "Deduplicate test code" This reverts commit ba46adbe089329c78cd69ccdb08e27ed67bd77cf. * Fix test * remove commented out code * minor to start CI run * start CI * Update client/consensus/slots/src/lib.rs Co-authored-by: Marcin S. <marcin@bytedude.com> * Apply PR suggestions * Apply PR suggestions * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * minor * kickoff CI * PR suggestions * Compute remaining duration instead of using slot_info.duration * Don't rely on sub implementation for Instant * Apply PR suggestions * Use saturating_duration_since Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Marcin S. <marcin@bytedude.com> Co-authored-by: parity-processbot <>
Provides types and traits for creating and checking inherents.
Each inherent is added to a produced block. Each runtime decides on which inherents it
wants to attach to its blocks. All data that is required for the runtime to create the inherents
is stored in the InherentData. This InherentData is constructed by the node and given to
the runtime.
Types that provide data for inherents, should implement InherentDataProvider and need to be
registered at InherentDataProviders.
In the runtime, modules need to implement ProvideInherent when they can create and/or check
inherents. By implementing ProvideInherent, a module is not enforced to create an inherent.
A module can also just check given inherents. For using a module as inherent provider, it needs
to be registered by the construct_runtime! macro. The macro documentation gives more
information on how that is done.
License: Apache-2.0