mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Remove old and add new migrations (#572)
This commit is contained in:
@@ -43,7 +43,7 @@ use codec::{Decode, Encode, MaxEncodedLen};
|
|||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, match_type, parameter_types,
|
construct_runtime, match_type, parameter_types,
|
||||||
traits::{Everything, Contains, InstanceFilter},
|
traits::{Contains, Everything, InstanceFilter},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight},
|
||||||
DispatchClass, IdentityFee, Weight,
|
DispatchClass, IdentityFee, Weight,
|
||||||
@@ -145,7 +145,9 @@ parameter_types! {
|
|||||||
|
|
||||||
pub struct BaseFilter;
|
pub struct BaseFilter;
|
||||||
impl Contains<Call> for BaseFilter {
|
impl Contains<Call> for BaseFilter {
|
||||||
fn contains(_c: &Call) -> bool { true }
|
fn contains(_c: &Call) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure FRAME pallets to include in runtime.
|
// Configure FRAME pallets to include in runtime.
|
||||||
@@ -739,8 +741,9 @@ pub type Executive = frame_executive::Executive<
|
|||||||
pub struct OnRuntimeUpgrade;
|
pub struct OnRuntimeUpgrade;
|
||||||
impl frame_support::traits::OnRuntimeUpgrade for OnRuntimeUpgrade {
|
impl frame_support::traits::OnRuntimeUpgrade for OnRuntimeUpgrade {
|
||||||
fn on_runtime_upgrade() -> u64 {
|
fn on_runtime_upgrade() -> u64 {
|
||||||
sp_io::storage::set(b":c", &[]);
|
frame_support::migrations::migrate_from_pallet_version_to_storage_version::<
|
||||||
RocksDbWeight::get().writes(1)
|
AllPalletsWithSystem,
|
||||||
|
>(&RocksDbWeight::get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -727,8 +727,9 @@ pub type Executive = frame_executive::Executive<
|
|||||||
pub struct OnRuntimeUpgrade;
|
pub struct OnRuntimeUpgrade;
|
||||||
impl frame_support::traits::OnRuntimeUpgrade for OnRuntimeUpgrade {
|
impl frame_support::traits::OnRuntimeUpgrade for OnRuntimeUpgrade {
|
||||||
fn on_runtime_upgrade() -> u64 {
|
fn on_runtime_upgrade() -> u64 {
|
||||||
sp_io::storage::set(b":c", &[]);
|
frame_support::migrations::migrate_from_pallet_version_to_storage_version::<
|
||||||
RocksDbWeight::get().writes(1)
|
AllPalletsWithSystem,
|
||||||
|
>(&RocksDbWeight::get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user