Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 5ca3777

Browse files
authored
Rename ModuleToIndex to PalletRuntimeSetup (#7148)
* Rename `ModuleToIndex` to `PalletRuntimeSetup` Besides the renaming it also adds support getting the name of a pallet as configured in the runtime. * Rename it to `PalletInfo` * Remove accidentally added files
1 parent 6017c2a commit 5ca3777

File tree

62 files changed

+121
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+121
-90
lines changed

bin/node-template/pallets/template/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl system::Trait for Test {
4242
type MaximumBlockLength = MaximumBlockLength;
4343
type AvailableBlockRatio = AvailableBlockRatio;
4444
type Version = ();
45-
type ModuleToIndex = ();
45+
type PalletInfo = ();
4646
type AccountData = ();
4747
type OnNewAccount = ();
4848
type OnKilledAccount = ();

bin/node-template/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl frame_system::Trait for Runtime {
181181
/// Converts a module to the index of the module in `construct_runtime!`.
182182
///
183183
/// This type is being generated by `construct_runtime!`.
184-
type ModuleToIndex = ModuleToIndex;
184+
type PalletInfo = PalletInfo;
185185
/// What to do if a new account is created.
186186
type OnNewAccount = ();
187187
/// What to do if an account is fully reaped from the system.

bin/node/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl frame_system::Trait for Runtime {
179179
type MaximumBlockLength = MaximumBlockLength;
180180
type AvailableBlockRatio = AvailableBlockRatio;
181181
type Version = Version;
182-
type ModuleToIndex = ModuleToIndex;
182+
type PalletInfo = PalletInfo;
183183
type AccountData = pallet_balances::AccountData<Balance>;
184184
type OnNewAccount = ();
185185
type OnKilledAccount = ();

frame/assets/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ mod tests {
319319
type AvailableBlockRatio = AvailableBlockRatio;
320320
type MaximumBlockLength = MaximumBlockLength;
321321
type Version = ();
322-
type ModuleToIndex = ();
322+
type PalletInfo = ();
323323
type AccountData = ();
324324
type OnNewAccount = ();
325325
type OnKilledAccount = ();

frame/atomic-swap/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl frame_system::Trait for Test {
4545
type MaximumBlockLength = MaximumBlockLength;
4646
type AvailableBlockRatio = AvailableBlockRatio;
4747
type Version = ();
48-
type ModuleToIndex = ();
48+
type PalletInfo = ();
4949
type AccountData = pallet_balances::AccountData<u64>;
5050
type OnNewAccount = ();
5151
type OnKilledAccount = ();

frame/aura/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl frame_system::Trait for Test {
6666
type AvailableBlockRatio = AvailableBlockRatio;
6767
type MaximumBlockLength = MaximumBlockLength;
6868
type Version = ();
69-
type ModuleToIndex = ();
69+
type PalletInfo = ();
7070
type AccountData = ();
7171
type OnNewAccount = ();
7272
type OnKilledAccount = ();

frame/authority-discovery/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ mod tests {
164164
type AvailableBlockRatio = AvailableBlockRatio;
165165
type MaximumBlockLength = MaximumBlockLength;
166166
type Version = ();
167-
type ModuleToIndex = ();
167+
type PalletInfo = ();
168168
type AccountData = ();
169169
type OnNewAccount = ();
170170
type OnKilledAccount = ();

frame/authorship/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ mod tests {
438438
type AvailableBlockRatio = AvailableBlockRatio;
439439
type MaximumBlockLength = MaximumBlockLength;
440440
type Version = ();
441-
type ModuleToIndex = ();
441+
type PalletInfo = ();
442442
type AccountData = ();
443443
type OnNewAccount = ();
444444
type OnKilledAccount = ();

frame/babe/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl frame_system::Trait for Test {
8686
type MaximumExtrinsicWeight = MaximumBlockWeight;
8787
type AvailableBlockRatio = AvailableBlockRatio;
8888
type MaximumBlockLength = MaximumBlockLength;
89-
type ModuleToIndex = ();
89+
type PalletInfo = ();
9090
type AccountData = pallet_balances::AccountData<u128>;
9191
type OnNewAccount = ();
9292
type OnKilledAccount = ();

frame/balances/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ impl<T: Subtrait<I>, I: Instance> frame_system::Trait for ElevatedTrait<T, I> {
902902
type MaximumBlockLength = T::MaximumBlockLength;
903903
type AvailableBlockRatio = T::AvailableBlockRatio;
904904
type Version = T::Version;
905-
type ModuleToIndex = T::ModuleToIndex;
905+
type PalletInfo = T::PalletInfo;
906906
type OnNewAccount = T::OnNewAccount;
907907
type OnKilledAccount = T::OnKilledAccount;
908908
type AccountData = T::AccountData;

0 commit comments

Comments
 (0)