Skip to content

Commit

Permalink
fix: host functions
Browse files Browse the repository at this point in the history
  • Loading branch information
orriin committed Nov 6, 2024
1 parent dfbed6b commit 5bdee48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ use node_subtensor_runtime::{
/// imported and generated.
const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512;

/// Only enable the benchmarking host functions when we actually want to benchmark.
#[cfg(feature = "runtime-benchmarks")]
/// Always enable runtime benchmark host functions, the genesis state
/// was built with them so we're stuck with them forever.
///
/// They're just a noop, never actually get used if the runtime was not compiled with
/// `runtime-benchmarks`.
pub type HostFunctions = (
sp_io::SubstrateHostFunctions,
frame_benchmarking::benchmarking::HostFunctions,
);
/// Otherwise we use empty host functions for ext host functions.
#[cfg(not(feature = "runtime-benchmarks"))]
pub type HostFunctions = sp_io::SubstrateHostFunctions;

pub type Backend = FullBackend<Block>;
pub type Client = FullClient<Block, RuntimeApi, HostFunctions>;
Expand Down

0 comments on commit 5bdee48

Please sign in to comment.