From 46da800b1bff2651f000a72001a8e4f8272a4a52 Mon Sep 17 00:00:00 2001 From: Dinonard Date: Mon, 12 Dec 2022 14:22:32 +0100 Subject: [PATCH 1/2] Only run pre-v8 migration check for versions older than 8 --- frame/contracts/src/migration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index aa04d8b9b1084..d76b8c22ffe60 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -69,7 +69,7 @@ impl OnRuntimeUpgrade for Migration { fn pre_upgrade() -> Result, &'static str> { let version = >::on_chain_storage_version(); - if version == 8 { + if version < 8 { v8::pre_upgrade::()?; } From 8bc2568d6a3b03df038649bbe950692012b07e14 Mon Sep 17 00:00:00 2001 From: Dinonard Date: Mon, 12 Dec 2022 14:26:10 +0100 Subject: [PATCH 2/2] Logix fix --- frame/contracts/src/migration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index d76b8c22ffe60..56d688abc7309 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -69,7 +69,7 @@ impl OnRuntimeUpgrade for Migration { fn pre_upgrade() -> Result, &'static str> { let version = >::on_chain_storage_version(); - if version < 8 { + if version == 7 { v8::pre_upgrade::()?; }