referrerpolicy=no-referrer-when-downgrade

Trait pallet_migrations::pallet::DefaultConfig

source ·
pub trait DefaultConfig: DefaultConfig {
    type RuntimeEvent;
    type CursorMaxLen: Get<u32>;
    type IdentifierMaxLen: Get<u32>;
    type MigrationStatusHandler: MigrationStatusHandler;
    type FailedMigrationHandler: FailedMigrationHandler;
    type MaxServiceWeight: Get<Weight>;
    type WeightInfo: WeightInfo;
}
Expand description

Based on Config. Auto-generated by #[pallet::config(with_default)]. Can be used in tandem with #[register_default_config] and #[derive_impl] to derive test config traits based on existing pallet config traits in a safe and developer-friendly way.

See here for more information and caveats about the auto-generated DefaultConfig trait and how it is generated.

Required Associated Types§

source

type RuntimeEvent

The overarching event type of the runtime.

source

type CursorMaxLen: Get<u32>

The maximal length of an encoded cursor.

A good default needs to selected such that no migration will ever have a cursor with MEL above this limit. This is statically checked in integrity_test.

source

type IdentifierMaxLen: Get<u32>

The maximal length of an encoded identifier.

A good default needs to selected such that no migration will ever have an identifier with MEL above this limit. This is statically checked in integrity_test.

source

type MigrationStatusHandler: MigrationStatusHandler

Notifications for status updates of a runtime upgrade.

Could be used to pause XCM etc.

source

type FailedMigrationHandler: FailedMigrationHandler

Handler for failed migrations.

source

type MaxServiceWeight: Get<Weight>

The maximum weight to spend each block to execute migrations.

source

type WeightInfo: WeightInfo

Weight information for the calls and functions of this pallet.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl DefaultConfig for TestDefaultConfig

§

type RuntimeEvent = ()

§

type CursorMaxLen = ConstU32<{ 1 << 16 }>

§

type IdentifierMaxLen = ConstU32<256>

§

type MigrationStatusHandler = ()

§

type FailedMigrationHandler = FreezeChainOnFailedMigration

§

type MaxServiceWeight = TestMaxServiceWeight

§

type WeightInfo = ()