mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 07:37:57 +00:00
Move type Migrations to Config (#14309)
* move migrate sequence to config * remove commented out code * Update frame/contracts/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * remove Migrations generic * make runtime use noop migrations * restrict is_upgrade_supported * undo is_upgrade_supported change * Update bin/node/runtime/src/lib.rs Co-authored-by: PG Herveou <pgherveou@gmail.com> * add rust doc example for `Migrations` * feature gate NoopMigration * fix example code * improve example --------- Co-authored-by: PG Herveou <pgherveou@gmail.com>
This commit is contained in:
@@ -55,6 +55,8 @@ use frame_system::{
|
||||
pub use node_primitives::{AccountId, Signature};
|
||||
use node_primitives::{AccountIndex, Balance, BlockNumber, Hash, Index, Moment};
|
||||
use pallet_asset_conversion::{NativeOrAssetId, NativeOrAssetIdConverter};
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use pallet_contracts::NoopMigration;
|
||||
use pallet_election_provider_multi_phase::SolutionAccuracyOf;
|
||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||
use pallet_nfts::PalletFeatures;
|
||||
@@ -1240,6 +1242,10 @@ impl pallet_contracts::Config for Runtime {
|
||||
type MaxStorageKeyLen = ConstU32<128>;
|
||||
type UnsafeUnstableInterface = ConstBool<false>;
|
||||
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type Migrations = ();
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
type Migrations = (NoopMigration<1>, NoopMigration<2>);
|
||||
}
|
||||
|
||||
impl pallet_sudo::Config for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user