add notes and warnings to ProvideInherent docs (#9730)

* add notes and warnings to ProvideInherent docs

* rephrase ProvideInherent doc comments

* more comment refinement

* remove multiple inherents note

* remove repetition

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* replace inherent example in docs

* add note about who checks is_inherent_required

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Alexander Popiak
2022-03-27 23:35:52 +02:00
committed by GitHub
parent 1cd13239d5
commit 13c78991f9
2 changed files with 32 additions and 15 deletions
+6 -6
View File
@@ -15,14 +15,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! Substrate inherent extrinsics
//! Substrate Inherent Extrinsics
//!
//! Inherent extrinsics are extrinsics that are inherently added to each block. However, it is up to
//! runtime implementation to require an inherent for each block or to make it optional. Inherents
//! are mainly used to pass data from the block producer to the runtime. So, inherents require some
//! part that is running on the client side and some part that is running on the runtime side. Any
//! data that is required by an inherent is passed as [`InherentData`] from the client to the
//! runtime when the inherents are constructed.
//! the runtime implementation to require an inherent for each block or to make it optional.
//! Inherents are mainly used to pass data from the block producer to the runtime. So, inherents
//! require some part that is running on the client side and some part that is running on the
//! runtime side. Any data that is required by an inherent is passed as [`InherentData`] from the
//! client to the runtime when the inherents are constructed.
//!
//! The process of constructing and applying inherents is the following:
//!