mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
[doc] Example MBM pallet (#2119)
## Basic example showcasing a migration using the MBM framework This PR has been built on top of https://github.com/paritytech/polkadot-sdk/pull/1781 and adds two new example crates to the `examples` pallet ### Changes Made: Added the `pallet-example-mbm` crate: This crate provides a minimal example of a pallet that uses MBM. It showcases a storage migration where values are migrated from a `u32` to a `u64`. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
@@ -441,6 +441,16 @@ pub enum SteppedMigrationError {
|
||||
Failed,
|
||||
}
|
||||
|
||||
/// A generic migration identifier that can be used by MBMs.
|
||||
///
|
||||
/// It is not required that migrations use this identifier type, but it can help.
|
||||
#[derive(MaxEncodedLen, Encode, Decode)]
|
||||
pub struct MigrationId<const N: usize> {
|
||||
pub pallet_id: [u8; N],
|
||||
pub version_from: u8,
|
||||
pub version_to: u8,
|
||||
}
|
||||
|
||||
/// Notification handler for status updates regarding Multi-Block-Migrations.
|
||||
#[impl_trait_for_tuples::impl_for_tuples(8)]
|
||||
pub trait MigrationStatusHandler {
|
||||
|
||||
Reference in New Issue
Block a user