From bbd5a1e5edabf106d6602c347024530f9ba7a153 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 6 Nov 2024 22:47:25 +0400 Subject: [PATCH] fix: host functions --- node/src/service.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/node/src/service.rs b/node/src/service.rs index cc0bf2862..613781268 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -17,8 +17,18 @@ use std::{sync::Arc, time::Duration}; /// imported and generated. const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; +/// 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, +); + pub(crate) type FullClient = - sc_service::TFullClient>; + sc_service::TFullClient>; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; @@ -55,7 +65,7 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_wasm_executor::(&config.executor); + let executor = sc_service::new_wasm_executor::(&config.executor); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::(