Crates.io | fabric-executive |
lib.rs | fabric-executive |
version | 2.0.0 |
source | src |
created_at | 2021-03-08 01:16:20.152684 |
updated_at | 2021-04-04 05:57:54.612495 |
description | FABRIC executives engine |
homepage | https://core.tetcoin.org |
repository | https://github.com/tetcoin/tetcore |
max_upload_size | |
id | 365445 |
size | 45,242 |
The Executive module acts as the orchestration layer for the runtime. It dispatches incoming extrinsic calls to the respective modules in the runtime.
The executive module is not a typical noble providing functionality around a specific feature. It is a cross-cutting framework component for the FABRIC. It works in conjunction with the FABRIC System module to perform these cross-cutting functions.
The Executive module provides functions to:
The Executive module provides the following implementations:
ExecuteBlock
: Trait that can be used to execute a block.Executive
: Type that can be used to make the FABRIC available from the runtime.The default Tetcore node template declares the Executive
type in its library.
Executive
type declaration from the node template.
#
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<Runtime, Block, Context, Runtime, AllModules>;
OnRuntimeUpgrade
logicYou can add custom logic that should be called in your runtime on a runtime upgrade. This is done by setting an optional generic parameter. The custom logic will be called before the on runtime upgrade logic of all modules is called.
#
struct CustomOnRuntimeUpgrade;
impl fabric_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> fabric_support::weights::Weight {
// Do whatever you want.
0
}
}
pub type Executive = executive::Executive<Runtime, Block, Context, Runtime, AllModules, CustomOnRuntimeUpgrade>;
License: Apache-2.0