diff --git a/frame/contracts/src/migration.rs b/frame/contracts/src/migration.rs index ad85da0477148..ce0e018f0ac3d 100644 --- a/frame/contracts/src/migration.rs +++ b/frame/contracts/src/migration.rs @@ -186,7 +186,7 @@ pub trait MigrateSequence: private::Sealed { return false }; - in_storage >= first_supported && target == high + in_storage == first_supported && target == high } } @@ -513,7 +513,7 @@ mod test { fn is_upgrade_supported_works() { type Migrations = (MockMigration<9>, MockMigration<10>, MockMigration<11>); - [(1, 1), (8, 11), (9, 11)].into_iter().for_each(|(from, to)| { + [(1, 1), (8, 11)].into_iter().for_each(|(from, to)| { assert!( Migrations::is_upgrade_supported( StorageVersion::new(from), @@ -525,7 +525,7 @@ mod test { ) }); - [(1, 0), (0, 3), (7, 11), (8, 10)].into_iter().for_each(|(from, to)| { + [(1, 0), (0, 3), (7, 11), (8, 10), (9, 11)].into_iter().for_each(|(from, to)| { assert!( !Migrations::is_upgrade_supported( StorageVersion::new(from),