Skip to content
Snippets Groups Projects
Commit 8f8b0887 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

node-template: Do not provide benchmarking host functions by default (#10005)

parent 582ac8f9
No related merge requests found
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment