referrerpolicy=no-referrer-when-downgrade
frame_support::traits

Trait UncheckedOnRuntimeUpgrade

Source
pub trait UncheckedOnRuntimeUpgrade {
    // Provided methods
    fn on_runtime_upgrade() -> Weight { ... }
    fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError> { ... }
    fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError> { ... }
}
Expand description

This trait is intended for use within VersionedMigration to execute storage migrations without automatic version checks. Implementations should ensure migration logic is safe and idempotent.

Provided Methods§

Source

fn on_runtime_upgrade() -> Weight

Called within VersionedMigration to execute the actual migration. It is also expected that no version checks are performed within this function.

See also Hooks::on_runtime_upgrade.

Source

fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError>

Source

fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrationToV2<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrationToV3<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrationToV4<T>

impl<T: Config<I>, I: 'static> UncheckedOnRuntimeUpgrade for UncheckedMigrationV0ToV1<T, I>

impl<T: Config<I>, I: 'static, LaneId: LaneIdType + Send + Sync> UncheckedOnRuntimeUpgrade for UncheckedMigrationV0ToV1<T, I, LaneId>

impl<T: Config<I>, I: 'static, LaneId: LaneIdType + Send + Sync> UncheckedOnRuntimeUpgrade for UncheckedMigrationV1ToV2<T, I, LaneId>
where <T as Config<I>>::Reward: From<RewardsAccountParams<LaneId>>,

impl<T: Config, BlockConversion: BlockToRelayHeightConversion<T>> UncheckedOnRuntimeUpgrade for MigrateToV4Impl<T, BlockConversion>

impl<T: Config, TransferWeight: Get<Weight>> UncheckedOnRuntimeUpgrade for MigrateToV1Impl<T, TransferWeight>

impl<T: Config + Config> UncheckedOnRuntimeUpgrade for UncheckedMigrationToV2<T>

impl<T: Config<I>, I: 'static> UncheckedOnRuntimeUpgrade for MigrateToV1<T, I>

impl<T: Config> UncheckedOnRuntimeUpgrade for InnerMigrateV0ToV1<T>

impl<T: Config, const KL: u64> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV0ToV1<T, KL>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV7ToV8<T>

impl<T: Config, S: MigrateDisabledValidators> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV0ToV1<T, S>

impl<T: Config<I>, I: Instance + 'static, PastPayouts: Get<Vec<(<T as Config>::AccountId, <<T as Config<I>>::Currency as Currency<<T as Config>::AccountId>>::Balance)>>> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV2<T, I, PastPayouts>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV14ToV15<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateV15ToV16<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV1<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV1<T>

impl<T: Config, UnlockParaIds: Contains<Id>> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV1<T, UnlockParaIds>

impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV10<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV11<T>

impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV12<T>