Skip to content

Commit c05342a

Browse files
authored
Merge pull request opentensor#928 from opentensor/fix-host-functions
fix: host functions (devnet-ready)
2 parents dfbed6b + 5bdee48 commit c05342a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

node/src/service.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ use node_subtensor_runtime::{
3535
/// imported and generated.
3636
const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512;
3737

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

4848
pub type Backend = FullBackend<Block>;
4949
pub type Client = FullClient<Block, RuntimeApi, HostFunctions>;

0 commit comments

Comments
 (0)