//! The executive module is not a typical pallet providing functionality around a specific feature.
//! The flow of their application in a block is explained in the [block flowchart](block_flowchart).
//! The default Substrate node template declares the [`Executive`](./struct.Executive.html) type in
//! # fn validate_unsigned(_source: TransactionSource, _call: &Self::Call) -> TransactionValidity {
//! pub type Executive = executive::Executive<Runtime, Block, Context, Runtime, AllPalletsWithSystem>;
//! # fn validate_unsigned(_source: TransactionSource, _call: &Self::Call) -> TransactionValidity {
//! pub type Executive = executive::Executive<Runtime, Block, Context, Runtime, AllPalletsWithSystem, CustomOnRuntimeUpgrade>;
/// - `AllPalletsWithSystem`: Tuple that contains all pallets including frame system pallet. Will be
/// - `OnRuntimeUpgrade`: Custom logic that should be called after a runtime upgrade. Modules are
/// already called by `AllPalletsWithSystem`. It will be called before all modules will be called.
for Executive<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade>
"try-runtime: executing block #{:?} / state root check: {:?} / signature check: {:?} / try-state-select: {:?}",
target: LOG_TARGET, "transaction {:?} failed due to {:?}. Aborting the rest of the block execution.",
fn extract_pre_digest(header: &frame_system::pallet_prelude::HeaderFor<System>) -> Digest {
/// Run the `on_idle` hook of all pallet, but only if there is weight remaining and there are no
let max_weight = <System::BlockWeights as frame_support::traits::Get<_>>::get().max_block;
let max_weight = <System::BlockWeights as frame_support::traits::Get<_>>::get().max_block;