@@ -27,8 +27,9 @@ use sc_executor::{
2727} ;
2828use sp_api:: { CallContext , StorageProof } ;
2929use sp_core:: {
30- hexdisplay:: HexDisplay , storage:: well_known_keys, traits:: ReadRuntimeVersion , twox_128 , Hasher ,
30+ hexdisplay:: HexDisplay , storage:: well_known_keys, traits:: ReadRuntimeVersion , Hasher ,
3131} ;
32+ use sp_crypto_hashing:: twox_128;
3233use sp_externalities:: Extensions ;
3334use sp_runtime:: {
3435 traits:: { BlakeTwo256 , Block as BlockT , HashingFor , Header as HeaderT } ,
@@ -382,7 +383,11 @@ pub(crate) fn state_machine_call<Block: BlockT, HostFns: HostFunctions>(
382383 method,
383384 data,
384385 & mut extensions,
385- & sp_state_machine:: backend:: BackendRuntimeCode :: new ( & ext. backend ) . runtime_code ( ) ?,
386+ & sp_state_machine:: backend:: BackendRuntimeCode :: new (
387+ & ext. backend ,
388+ sp_state_machine:: backend:: TryPendingCode :: No ,
389+ )
390+ . runtime_code ( ) ?,
386391 CallContext :: Offchain ,
387392 )
388393 . execute ( )
@@ -405,7 +410,10 @@ pub(crate) fn state_machine_call_with_proof<Block: BlockT, HostFns: HostFunction
405410 mut extensions : Extensions ,
406411 maybe_export_proof : Option < PathBuf > ,
407412) -> sc_cli:: Result < ( StorageProof , Vec < u8 > ) > {
408- let runtime_code_backend = sp_state_machine:: backend:: BackendRuntimeCode :: new ( & ext. backend ) ;
413+ let runtime_code_backend = sp_state_machine:: backend:: BackendRuntimeCode :: new (
414+ & ext. backend ,
415+ sp_state_machine:: backend:: TryPendingCode :: No ,
416+ ) ;
409417 let proving_backend = TrieBackendBuilder :: wrap ( & ext. backend )
410418 . with_recorder ( Default :: default ( ) )
411419 . build ( ) ;
0 commit comments