pub async fn create_invalid_block_hook<N, P, E>(
config: &NodeConfig<<P as ChainSpecProvider>::ChainSpec>,
data_dir: &ChainPath<DataDirPath>,
provider: P,
evm_config: E,
chain_id: u64,
) -> Result<Box<dyn InvalidBlockHook<N>>, Report>where
N: NodePrimitives,
P: StateProviderFactory + ChainSpecProvider + Clone + Send + Sync + 'static,
E: ConfigureEvm<Primitives = N> + Clone + 'static,Expand description
Creates an invalid block hook based on the node configuration.
This function constructs the appropriate InvalidBlockHook based on the debug
configuration in the node config. It supports:
- Witness hooks for capturing block witness data
- Healthy node verification via RPC
ยงArguments
config- The node configuration containing debug settingsdata_dir- The data directory for storing hook outputsprovider- The blockchain database providerevm_config- The EVM configurationchain_id- The chain ID for verification