Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused weight files #57

Merged
merged 12 commits into from
Jan 10, 2024
19 changes: 14 additions & 5 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl pallet_balances::Config for Runtime {
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_balances_native::WeightInfo<Runtime>;
type FreezeIdentifier = ();
type MaxFreezes = ();
type RuntimeHoldReason = RuntimeHoldReason;
Expand Down Expand Up @@ -1402,7 +1402,7 @@ impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
type MaxLocks = ConstU32<4>;
type MaxReserves = ConstU32<4>;
type ReserveIdentifier = [u8; 8];
type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo<Runtime>;
type WeightInfo = weights::pallet_balances_nis::WeightInfo<Runtime>;
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
Expand Down Expand Up @@ -1573,7 +1573,6 @@ construct_runtime! {

// NIS pallet.
Nis: pallet_nis::{Pallet, Call, Storage, Event<T>, HoldReason} = 38,
// pub type NisCounterpartInstance = pallet_balances::Instance2;
NisCounterpartBalances: pallet_balances::<Instance2> = 45,

// Provides a semi-sorted list of nominators for staking.
Expand Down Expand Up @@ -1797,8 +1796,8 @@ mod benches {
[runtime_parachains::paras_inherent, ParaInherent]
[runtime_parachains::paras, Paras]
// Substrate
[pallet_balances, Balances]
[pallet_balances, NisCounterpartBalances]
[pallet_balances, Native]
[pallet_balances, Nis]
[pallet_bags_list, VoterList]
[frame_benchmarking::baseline, Baseline::<Runtime>]
[pallet_bounties, Bounties]
Expand Down Expand Up @@ -2333,6 +2332,13 @@ sp_api::impl_runtime_apis! {
use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench;
use frame_benchmarking::baseline::Pallet as Baseline;

// Benchmark files generated for `Balances/NisCounterpartBalances` instances are by default
// `pallet_balances_balances.rs / pallet_balances_nis_counterpart_balances`, which is not really nice,
// so with this redefinition we can change names to nicer:
// `pallet_balances_native.rs / pallet_balances_nis.rs`.
type Native = pallet_balances::Pallet::<Runtime, ()>;
type Nis = pallet_balances::Pallet::<Runtime, NisCounterpartInstance>;

let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);

Expand Down Expand Up @@ -2457,6 +2463,9 @@ sp_api::impl_runtime_apis! {
}
}

type Native = pallet_balances::Pallet::<Runtime, ()>;
type Nis = pallet_balances::Pallet::<Runtime, NisCounterpartInstance>;

let mut whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
let treasury_key = frame_system::Account::<Runtime>::hashed_key_for(Treasury::account_id());
whitelist.push(treasury_key.to_vec().into());
Expand Down
10 changes: 2 additions & 8 deletions relay/kusama/src/weights/mod.rs

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

99 changes: 0 additions & 99 deletions relay/kusama/src/weights/pallet_balances.rs

This file was deleted.

Loading
Loading