tp-inherents

Crates.iotp-inherents
lib.rstp-inherents
version2.1.2
sourcesrc
created_at2021-04-02 00:51:36.701621
updated_at2021-06-23 04:08:48.503279
descriptionProvides types and traits for creating and checking inherents.
homepagehttps://core.tetcoin.org
repositoryhttps://github.com/tetcoin/tetcore
max_upload_size
id377218
size21,537
Marlon Hanks (marlonhanks)

documentation

https://docs.rs/tp-inherents

README

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

Commit count: 5279

cargo fmt