Fix try-runtime with create-snapshot (#13223)

* Fix try-runtime with create-snapshot

* Apply review suggestions
This commit is contained in:
zjb0807
2023-01-26 12:12:19 +13:00
committed by GitHub
parent 1da71f0226
commit 73a9776266
6 changed files with 10 additions and 7 deletions
@@ -71,7 +71,7 @@ where
let executor = build_executor::<HostFns>(&shared);
let _ = State::Live(command.from)
.into_ext::<Block, HostFns>(&shared, &executor, Some(path.into()))
.into_ext::<Block, HostFns>(&shared, &executor, Some(path.into()), false)
.await?;
Ok(())
@@ -99,7 +99,7 @@ where
HostFns: HostFunctions,
{
let executor = build_executor::<HostFns>(&shared);
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None).await?;
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None, true).await?;
// get the block number associated with this block.
let block_ws_uri = command.block_ws_uri::<Block>();
@@ -137,7 +137,7 @@ where
pallet: vec![],
child_tree: true,
});
let ext = state.into_ext::<Block, HostFns>(&shared, &executor, None).await?;
let ext = state.into_ext::<Block, HostFns>(&shared, &executor, None, true).await?;
maybe_state_ext = Some(ext);
}
@@ -78,7 +78,7 @@ where
{
let executor = build_executor(&shared);
// we first build the externalities with the remote code.
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None).await?;
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None, true).await?;
let header_ws_uri = command.header_ws_uri::<Block>();
@@ -62,7 +62,7 @@ where
HostFns: HostFunctions,
{
let executor = build_executor(&shared);
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None).await?;
let ext = command.state.into_ext::<Block, HostFns>(&shared, &executor, None, true).await?;
let (_, encoded_result) = state_machine_call_with_proof::<Block, HostFns>(
&ext,