Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 1 addition & 34 deletions parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1253,42 +1253,9 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(
// Vault Capacity Model
reward::migration::v1::MigrateToV1<Runtime, EscrowRewardsInstance>,
vault_registry::migration::vault_capacity::RewardsMigration<
Runtime,
VaultCapacityInstance,
VaultRewardsInstance,
>,
democracy::migrations::v1::Migration<Runtime>,
SudoMigrationCheck,
),
(democracy::migrations::v1::Migration<Runtime>,),
>;

struct SudoMigrationCheck;

impl OnRuntimeUpgrade for SudoMigrationCheck {
fn on_runtime_upgrade() -> Weight {
use frame_support::storage::migration::take_storage_value;
take_storage_value::<AccountId>(b"Sudo", b"Key", &[]);
Default::default()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
Ok(Vec::new())
}
#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: Vec<u8>) -> Result<(), &'static str> {
assert!(pallet_sudo::Pallet::<Runtime>::key().is_none());
log::info!(
target: "runtime",
"sudo key None 👍"
);
Ok(())
}
}

#[cfg(not(feature = "disable-runtime-api"))]
impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
Expand Down
11 changes: 1 addition & 10 deletions parachain/runtime/testnet-kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,16 +1277,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
(
// Vault Capacity Model
reward::migration::v1::MigrateToV1<Runtime, EscrowRewardsInstance>,
vault_registry::migration::vault_capacity::RewardsMigration<
Runtime,
VaultCapacityInstance,
VaultRewardsInstance,
>,
democracy::migrations::v1::Migration<Runtime>,
),
(democracy::migrations::v1::Migration<Runtime>,),
>;

#[cfg(not(feature = "disable-runtime-api"))]
Expand Down