pub trait GetStorageVersion {
    fn current_storage_version() -> StorageVersion;
    fn on_chain_storage_version() -> StorageVersion;
}
Expand description

Provides information about the storage version of a pallet.

It differentiates between current and on-chain storage version. Both should be only out of sync when a new runtime upgrade was applied and the runtime migrations did not yet executed. Otherwise it means that the pallet works with an unsupported storage version and unforeseen stuff can happen.

The current storage version is the version of the pallet as supported at runtime. The active storage version is the version of the pallet in the storage.

It is required to update the on-chain storage version manually when a migration was applied.

Required Methods§

Returns the current storage version as supported by the pallet.

Returns the on-chain storage version of the pallet as stored in the storage.

Implementors§