mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
try-runtime - support all state versions (#12089)
* Add argument * Apply * More verbose parsing * fmt * fmt again * Invalid state version * reuse parsing * type mismatch
This commit is contained in:
committed by
GitHub
parent
75a76d967b
commit
9e5b211828
@@ -139,7 +139,8 @@ where
|
||||
.state
|
||||
.builder::<Block>()?
|
||||
// make sure the state is being build with the parent hash, if it is online.
|
||||
.overwrite_online_at(parent_hash.to_owned());
|
||||
.overwrite_online_at(parent_hash.to_owned())
|
||||
.state_version(shared.state_version);
|
||||
|
||||
let builder = if command.overwrite_wasm_code {
|
||||
log::info!(
|
||||
|
||||
@@ -102,11 +102,13 @@ where
|
||||
|
||||
// create an ext at the state of this block, whatever is the first subscription event.
|
||||
if maybe_state_ext.is_none() {
|
||||
let builder = Builder::<Block>::new().mode(Mode::Online(OnlineConfig {
|
||||
transport: command.uri.clone().into(),
|
||||
at: Some(*header.parent_hash()),
|
||||
..Default::default()
|
||||
}));
|
||||
let builder = Builder::<Block>::new()
|
||||
.mode(Mode::Online(OnlineConfig {
|
||||
transport: command.uri.clone().into(),
|
||||
at: Some(*header.parent_hash()),
|
||||
..Default::default()
|
||||
}))
|
||||
.state_version(shared.state_version);
|
||||
|
||||
let new_ext = builder
|
||||
.inject_hashed_key_value(&[(code_key.clone(), code.clone())])
|
||||
|
||||
@@ -128,7 +128,7 @@ where
|
||||
);
|
||||
|
||||
let ext = {
|
||||
let builder = command.state.builder::<Block>()?;
|
||||
let builder = command.state.builder::<Block>()?.state_version(shared.state_version);
|
||||
|
||||
let builder = if command.overwrite_wasm_code {
|
||||
log::info!(
|
||||
|
||||
@@ -52,7 +52,7 @@ where
|
||||
let execution = shared.execution;
|
||||
|
||||
let ext = {
|
||||
let builder = command.state.builder::<Block>()?;
|
||||
let builder = command.state.builder::<Block>()?.state_version(shared.state_version);
|
||||
let (code_key, code) = extract_code(&config.chain_spec)?;
|
||||
builder.inject_hashed_key_value(&[(code_key, code)]).build().await?
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user