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

Remove PalletInfo impl for () #8090

Merged
1 commit merged into from
Feb 9, 2021
Merged

Remove PalletInfo impl for () #8090

1 commit merged into from
Feb 9, 2021

Conversation

ascjones
Copy link
Contributor

@ascjones ascjones commented Feb 9, 2021

Fixes #7949

polkadot companion: paritytech/polkadot#2409

@ascjones ascjones added the C1-low PR touches the given topic and has a low impact on builders. label Feb 9, 2021
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Feb 9, 2021
@ascjones ascjones requested a review from gui1117 February 9, 2021 16:28
@gui1117
Copy link
Contributor

gui1117 commented Feb 9, 2021

To fix this breaking change user must:

  • either make use of construct_runtime which declares the ready to use type PalletInfo with correct implementation.
  • or implement it themself.

To make use of construct_runtime is test of pallet, one can look at node-template:

use crate as pallet_template;

type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
type Block = frame_system::mocking::MockBlock<Test>;
// Configure a mock runtime to test the pallet.
frame_support::construct_runtime!(
pub enum Test where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Config, Storage, Event<T>},
TemplateModule: pallet_template::{Module, Call, Storage, Event<T>},
}
);

@ascjones
Copy link
Contributor Author

ascjones commented Feb 9, 2021

bot merge

@ghost
Copy link

ghost commented Feb 9, 2021

Trying merge.

@ghost ghost merged commit 4777aba into master Feb 9, 2021
@ghost ghost deleted the aj-remove-pallet-info-unit-impl branch February 9, 2021 16:46
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default PalletInfo impl for () can cause storage collisions
4 participants