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

Ensure every pallet for which Config is implemented is declared through construct_runtime. #9130

Open
Tracked by #264
gui1117 opened this issue Jun 16, 2021 · 0 comments

Comments

@gui1117
Copy link
Contributor

gui1117 commented Jun 16, 2021

Currently if a pallet config is implemented for the runtime, but not part of construct_runtime, then it has no name.

In this case every call to <<Runtime as frame_system::Config>::PalletInfo as PalletInfo>::name<PalletWronglyConfigured>() will return None and lots of pallet expect it to be Some (e.g. storage expect that the pallet has some name).

One way to double check that pallet is correctly configured is to have a supertrait for the config trait which is only implemented by the macro:

trait Config: frame_system::Config + MyPalletKindOfSealThroughMacro {...}

and construct_runtime would implement MyPalletKindOfSealThroughMacro for the runtime.

but I worry the error message is pretty bad.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant