Skip to content

Commit 3bc74ac

Browse files
authored
Fix validators migration (#1858)
* Fix migration of permissioned validators from Staking pallet. * Bump spec.
1 parent 645246c commit 3bc74ac

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pallets/runtime/develop/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
5555
impl_name: Cow::Borrowed("polymesh_dev"),
5656
authoring_version: 1,
5757
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
58-
spec_version: 8_000_000,
58+
spec_version: 8_000_001,
5959
impl_version: 0,
6060
apis: RUNTIME_API_VERSIONS,
6161
transaction_version: 8,

pallets/runtime/mainnet/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
5555
impl_name: Cow::Borrowed("polymesh_mainnet"),
5656
authoring_version: 1,
5757
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
58-
spec_version: 8_000_000,
58+
spec_version: 8_000_001,
5959
impl_version: 0,
6060
apis: RUNTIME_API_VERSIONS,
6161
transaction_version: 8,

pallets/runtime/testnet/src/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
5757
impl_name: Cow::Borrowed("polymesh_testnet"),
5858
authoring_version: 1,
5959
// `spec_version: aaa_bbb_ccd` should match node version v`aaa.bbb.cc`
60-
spec_version: 8_000_000,
60+
spec_version: 8_000_001,
6161
impl_version: 0,
6262
apis: RUNTIME_API_VERSIONS,
6363
transaction_version: 8,

pallets/validators/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ mod migrations {
9090
let in_code = Pallet::<T>::in_code_storage_version();
9191
let on_chain = Pallet::<T>::on_chain_storage_version();
9292

93-
if on_chain < 1 {
93+
if on_chain == 1 && in_code == 1 {
9494
let old_pallet = b"Staking";
9595
let new_pallet = Pallet::<T>::name().as_bytes();
9696
// Move: PermissionedIdentity

0 commit comments

Comments
 (0)