mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Rework the runtime upgrade test (#727)
* Rework the runtime upgrade test * Update test/service/tests/runtime_upgrade.rs * Update test/service/tests/runtime_upgrade.rs * Update Cargo.lock * FMT Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -73,17 +73,11 @@ async fn test_runtime_upgrade() {
|
||||
.expect("Runtime version exists");
|
||||
expected_runtime_version.spec_version += 1;
|
||||
|
||||
// Replace the runtime version in the WASM blob to make it look like a new runtime.
|
||||
let wasm = sp_maybe_compressed_blob::decompress(
|
||||
cumulus_test_runtime_upgrade::WASM_BINARY.unwrap(),
|
||||
sp_maybe_compressed_blob::CODE_BLOB_BOMB_LIMIT,
|
||||
)
|
||||
.expect("Decompressing the WASM blob works");
|
||||
let wasm = sp_version::embed::embed_runtime_version(&wasm, expected_runtime_version.clone())
|
||||
.expect("Embedding the runtime version works");
|
||||
let wasm = cumulus_test_runtime::wasm_spec_version_incremented::WASM_BINARY
|
||||
.expect("Wasm binary with incremented spec version should have been built");
|
||||
|
||||
// schedule runtime upgrade
|
||||
charlie.schedule_upgrade(wasm).await.unwrap();
|
||||
charlie.schedule_upgrade(wasm.into()).await.unwrap();
|
||||
|
||||
let mut import_stream = dave.client.import_notification_stream();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user