mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 05:17:58 +00:00
Fix try-runtime with create-snapshot (#13223)
* Fix try-runtime with create-snapshot * Apply review suggestions
This commit is contained in:
@@ -609,6 +609,7 @@ impl State {
|
||||
shared: &SharedParams,
|
||||
executor: &WasmExecutor<HostFns>,
|
||||
state_snapshot: Option<SnapshotConfig>,
|
||||
try_runtime_check: bool,
|
||||
) -> sc_cli::Result<RemoteExternalities<Block>>
|
||||
where
|
||||
Block::Hash: FromStr,
|
||||
@@ -707,8 +708,10 @@ impl State {
|
||||
}
|
||||
|
||||
// whatever runtime we have in store now must have been compiled with try-runtime feature.
|
||||
if !ensure_try_runtime::<Block, HostFns>(&executor, &mut ext) {
|
||||
return Err("given runtime is NOT compiled with try-runtime feature!".into())
|
||||
if try_runtime_check {
|
||||
if !ensure_try_runtime::<Block, HostFns>(&executor, &mut ext) {
|
||||
return Err("given runtime is NOT compiled with try-runtime feature!".into())
|
||||
}
|
||||
}
|
||||
|
||||
Ok(ext)
|
||||
|
||||
Reference in New Issue
Block a user