diff --git a/parachain/runtime/interlay/src/lib.rs b/parachain/runtime/interlay/src/lib.rs index 90e1cbfa6a..7d3c740047 100644 --- a/parachain/runtime/interlay/src/lib.rs +++ b/parachain/runtime/interlay/src/lib.rs @@ -1278,8 +1278,8 @@ struct SudoMigrationCheck; impl OnRuntimeUpgrade for SudoMigrationCheck { fn on_runtime_upgrade() -> Weight { - use frame_support::storage::migration::put_storage_value; - put_storage_value(b"Sudo", b"Key", &[], Option::::None); + use frame_support::storage::migration::take_storage_value; + take_storage_value::(b"Sudo", b"Key", &[]); Default::default() } #[cfg(feature = "try-runtime")] diff --git a/parachain/runtime/kintsugi/src/lib.rs b/parachain/runtime/kintsugi/src/lib.rs index 6fdccc1689..b751ea6315 100644 --- a/parachain/runtime/kintsugi/src/lib.rs +++ b/parachain/runtime/kintsugi/src/lib.rs @@ -1272,8 +1272,8 @@ struct SudoMigrationCheck; impl OnRuntimeUpgrade for SudoMigrationCheck { fn on_runtime_upgrade() -> Weight { - use frame_support::storage::migration::put_storage_value; - put_storage_value(b"Sudo", b"Key", &[], Option::::None); + use frame_support::storage::migration::take_storage_value; + take_storage_value::(b"Sudo", b"Key", &[]); Default::default() } #[cfg(feature = "try-runtime")] diff --git a/standalone/runtime/tests/test_governance.rs b/standalone/runtime/tests/test_governance.rs index a8cdc69bd4..1a09e1e07e 100644 --- a/standalone/runtime/tests/test_governance.rs +++ b/standalone/runtime/tests/test_governance.rs @@ -940,9 +940,9 @@ fn test_sudo_is_disabled_if_key_is_none() { }) .dispatch(origin_of(account_of(ALICE))),); - use frame_support::storage::migration::put_storage_value; + use frame_support::storage::migration::take_storage_value; assert!(!pallet_sudo::Pallet::::key().is_none()); - put_storage_value(b"Sudo", b"Key", &[], Option::::None); + take_storage_value::(b"Sudo", b"Key", &[]); assert!(pallet_sudo::Pallet::::key().is_none()); // assert that sudo does not work when key is none