@@ -17,8 +17,18 @@ use std::{sync::Arc, time::Duration};
17
17
/// imported and generated.
18
18
const GRANDPA_JUSTIFICATION_PERIOD : u32 = 512 ;
19
19
20
+ /// Always enable runtime benchmark host functions, the genesis state
21
+ /// was built with them so we're stuck with them forever.
22
+ ///
23
+ /// They're just a noop, never actually get used if the runtime was not compiled with
24
+ /// `runtime-benchmarks`.
25
+ pub type HostFunctions = (
26
+ sp_io:: SubstrateHostFunctions ,
27
+ frame_benchmarking:: benchmarking:: HostFunctions ,
28
+ ) ;
29
+
20
30
pub ( crate ) type FullClient =
21
- sc_service:: TFullClient < Block , RuntimeApi , WasmExecutor < sp_io :: SubstrateHostFunctions > > ;
31
+ sc_service:: TFullClient < Block , RuntimeApi , WasmExecutor < HostFunctions > > ;
22
32
type FullBackend = sc_service:: TFullBackend < Block > ;
23
33
type FullSelectChain = sc_consensus:: LongestChain < FullBackend , Block > ;
24
34
@@ -55,7 +65,7 @@ pub fn new_partial(
55
65
} )
56
66
. transpose ( ) ?;
57
67
58
- let executor = sc_service:: new_wasm_executor :: < sp_io :: SubstrateHostFunctions > ( & config. executor ) ;
68
+ let executor = sc_service:: new_wasm_executor :: < HostFunctions > ( & config. executor ) ;
59
69
60
70
let ( client, backend, keystore_container, task_manager) =
61
71
sc_service:: new_full_parts :: < Block , RuntimeApi , _ > (
0 commit comments