Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions relay/polkadot/src/ah_migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
//! Asset Hub Migration.

pub mod phase1;
pub mod weights;
42 changes: 42 additions & 0 deletions relay/polkadot/src/ah_migration/weights.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use crate::*;
use frame_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};

/// DB Weight config trait adapter for AH migrator pallet weights.
pub trait DbConfig {
type DbWeight: Get<RuntimeDbWeight>;
}

/// DB Weight config type adapter for AH migrator pallet weights.
pub struct AhDbConfig;
impl DbConfig for AhDbConfig {
type DbWeight = RocksDbWeight;
}

parameter_types! {
/// Asset Hub DB Weights.
///
/// Copied from `asset_hub_polkadot::weights::RocksDbWeight`.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
write: 100_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
};
}
3 changes: 1 addition & 2 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,8 +1547,7 @@ impl pallet_rc_migrator::Config for Runtime {
type AhExistentialDeposit = AhExistentialDeposit;
// TODO: weights::pallet_rc_migrator::WeightInfo
type RcWeightInfo = ();
// TODO: weights::pallet_ah_migrator::WeightInfo
type AhWeightInfo = ();
type AhWeightInfo = weights::pallet_ah_migrator::WeightInfo<ah_migration::weights::AhDbConfig>;
type RcIntraMigrationCalls = ahm_phase1::CallsEnabledDuringMigration;
type RcPostMigrationCalls = ahm_phase1::CallsEnabledAfterMigration;
}
Expand Down
1 change: 1 addition & 0 deletions relay/polkadot/src/weights/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

195 changes: 195 additions & 0 deletions relay/polkadot/src/weights/pallet_ah_migrator.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading