Upgrade authorship pallet to Frame-v2#8663
Conversation
|
relates #7882 |
|
|
I believe it needs a polkadot companion pr to add Authorship to certain mocks |
Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
gui1117
left a comment
There was a problem hiding this comment.
can you put this message #8663 (comment) in the top message
And also add that the pallet needs to be part of the pallets in construct_runtime to work properly, thus tests might need to be changed.
Otherwise it looks good to me, but it needs a companion PR on polkadot
| } | ||
|
|
||
| <Self as Store>::DidSetUncles::put(false); | ||
| <DidSetUncles<T>>::put(false); |
There was a problem hiding this comment.
We can still use the trait Store, but I'm fine with the change too.
There was a problem hiding this comment.
yeah I realized that after I already changed them ¯_(ツ)_/¯
There was a problem hiding this comment.
In general I prefer the syntax like DidSetUncles::<T>::put(false), but its all the same.
| UncheckedExtrinsic = UncheckedExtrinsic, | ||
| { | ||
| System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, | ||
| Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent}, |
There was a problem hiding this comment.
This is not used as far as I can see. If so, You should remove the impl block rather than adding it here.
There was a problem hiding this comment.
pallet authorship is used in the equivocation handler (equivocation handler used in the mock requires pallet authorship)
| UncheckedExtrinsic = UncheckedExtrinsic, | ||
| { | ||
| System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, | ||
| Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent}, |
There was a problem hiding this comment.
same used for equivocation handler
| UncheckedExtrinsic = UncheckedExtrinsic, | ||
| { | ||
| System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, | ||
| Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent}, |
There was a problem hiding this comment.
it is used in tests to note uncles and check the reward points I think
kianenigma
left a comment
There was a problem hiding this comment.
And also add that the pallet needs to be part of the pallets in construct_runtime to work properly, thus tests might need to be changed.
I'm a bit confused about this, but I suppose it is my mistake. LGTM otherwise.
pallet which are implemented for a runtime needs to be part of construct_runtime in order to have the pallet info accessible. |
|
bot merge |
|
Trying merge. |
* first commit * get to compile * fix deprecated grandpa * formatting * module to pallet * add authorship pallet to mocks * Fix upgrade of storage. Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> * trigger CI * put back doc Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
bumped authorship pallet to framev2 :)
This PR needs a polkadot companion pr to add Authorship to certain mocks
construct-runtime!.The pallet needs to be part of the pallets in construct_runtime to work properly, thus tests might need to be changed.
polkadot companion: paritytech/polkadot#2945