mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
node-template: Do not provide benchmarking host functions by default (#10005)
This commit is contained in:
@@ -16,7 +16,12 @@ use std::{sync::Arc, time::Duration};
|
||||
pub struct ExecutorDispatch;
|
||||
|
||||
impl sc_executor::NativeExecutionDispatch for ExecutorDispatch {
|
||||
/// Only enable the benchmarking host functions when we actually want to benchmark.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
|
||||
/// Otherwise we only use the default Substrate host functions.
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type ExtendHostFunctions = ();
|
||||
|
||||
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
|
||||
node_template_runtime::api::dispatch(method, data)
|
||||
|
||||
Reference in New Issue
Block a user