@@ -327,7 +327,7 @@ impl pallet_balances::Config for Runtime {
327327 type MaxLocks = MaxLocks ;
328328 type MaxReserves = MaxReserves ;
329329 type ReserveIdentifier = [ u8 ; 8 ] ;
330- type WeightInfo = weights:: pallet_balances_balances :: WeightInfo < Runtime > ;
330+ type WeightInfo = weights:: pallet_balances_native :: WeightInfo < Runtime > ;
331331 type FreezeIdentifier = RuntimeFreezeReason ;
332332 type MaxFreezes = ConstU32 < 8 > ;
333333 type RuntimeHoldReason = RuntimeHoldReason ;
@@ -1406,7 +1406,7 @@ impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
14061406 type MaxLocks = ConstU32 < 4 > ;
14071407 type MaxReserves = ConstU32 < 4 > ;
14081408 type ReserveIdentifier = [ u8 ; 8 ] ;
1409- type WeightInfo = weights:: pallet_balances_nis_counterpart_balances :: WeightInfo < Runtime > ;
1409+ type WeightInfo = weights:: pallet_balances_nis :: WeightInfo < Runtime > ;
14101410 type RuntimeHoldReason = RuntimeHoldReason ;
14111411 type RuntimeFreezeReason = RuntimeFreezeReason ;
14121412 type FreezeIdentifier = ( ) ;
@@ -1591,7 +1591,6 @@ construct_runtime! {
15911591
15921592 // NIS pallet.
15931593 Nis : pallet_nis:: { Pallet , Call , Storage , Event <T >, HoldReason } = 38 ,
1594- // pub type NisCounterpartInstance = pallet_balances::Instance2;
15951594 NisCounterpartBalances : pallet_balances:: <Instance2 > = 45 ,
15961595
15971596 // Provides a semi-sorted list of nominators for staking.
@@ -1721,8 +1720,8 @@ mod benches {
17211720 [ runtime_parachains:: paras_inherent, ParaInherent ]
17221721 [ runtime_parachains:: paras, Paras ]
17231722 // Substrate
1724- [ pallet_balances, Balances ]
1725- [ pallet_balances, NisCounterpartBalances ]
1723+ [ pallet_balances, Native ]
1724+ [ pallet_balances, Nis ]
17261725 [ pallet_bags_list, VoterList ]
17271726 [ frame_benchmarking:: baseline, Baseline :: <Runtime >]
17281727 [ pallet_bounties, Bounties ]
@@ -2281,6 +2280,13 @@ sp_api::impl_runtime_apis! {
22812280 use pallet_nomination_pools_benchmarking:: Pallet as NominationPoolsBench ;
22822281 use frame_benchmarking:: baseline:: Pallet as Baseline ;
22832282
2283+ // Benchmark files generated for `Balances/NisCounterpartBalances` instances are by default
2284+ // `pallet_balances_balances.rs / pallet_balances_nis_counterpart_balances`, which is not really nice,
2285+ // so with this redefinition we can change names to nicer:
2286+ // `pallet_balances_native.rs / pallet_balances_nis.rs`.
2287+ type Native = pallet_balances:: Pallet :: <Runtime , ( ) >;
2288+ type Nis = pallet_balances:: Pallet :: <Runtime , NisCounterpartInstance >;
2289+
22842290 let mut list = Vec :: <BenchmarkList >:: new( ) ;
22852291 list_benchmarks!( list, extra) ;
22862292
@@ -2421,6 +2427,9 @@ sp_api::impl_runtime_apis! {
24212427 }
24222428 }
24232429
2430+ type Native = pallet_balances:: Pallet :: <Runtime , ( ) >;
2431+ type Nis = pallet_balances:: Pallet :: <Runtime , NisCounterpartInstance >;
2432+
24242433 let mut whitelist: Vec <TrackedStorageKey > = AllPalletsWithSystem :: whitelisted_storage_keys( ) ;
24252434 let treasury_key = frame_system:: Account :: <Runtime >:: hashed_key_for( Treasury :: account_id( ) ) ;
24262435 whitelist. push( treasury_key. to_vec( ) . into( ) ) ;
0 commit comments