From 0b005a5f928ef971d16ada2af09c2e7a61c28a9c Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:04:10 +0200 Subject: [PATCH] Run single block migrations in executive to make it compatible with the try-runtime-cli (#60) --- runtime/bajun/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index 56ab2de..b8d1b50 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -157,6 +157,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, + SingleBlockMigrations, >; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the @@ -374,7 +375,12 @@ impl frame_system::Config for Runtime { /// The Block provider type type Block = Block; type RuntimeTask = RuntimeTask; - type SingleBlockMigrations = SingleBlockMigrations; + // Note: Single block migrations are currently run in the classical way in the `Executive` + // because try-runtime doesn't support the pallet-migrations yet. + // + // Once it is supported, we want to switch to the pallet-migrations, but we **must** ensure + // that we remove the migrations from the `Executive` to prevent running the migrations twice. + type SingleBlockMigrations = (); type MultiBlockMigrator = pallet_migrations::Pallet; type PreInherents = (); type PostInherents = ();