Migrate pallet-grandpa to attribute macros (#8724)

* frame/grandpa: migrate Config

* frame/grandpa: migrate decl_module

* frame/grandpa: migrate decl_event

* frame/grandpa: migrate decl_error

* frame/grandpa: migrate decl_storage

* frame/grandpa: make report_equivocation_unsigned pub(super)

* frame/grandpa: remove unused imports

* frame/grandpa: replace deprecated Module with Pallet

* frame/grandpa: add RawEvent for compatibility

* frame/grandpa: create migration to new storage prefix

* frame/grandpa: bump version to 4.0.0

* frame/grandpa: address review comments

* Try using version 3.1 instead

* frame/grandpa: tweak log text to say cancelled
This commit is contained in:
Jon Häggblad authored and GitHub committed 2021-05-26 16:26:15 +00:00
1 parent 4ee5da2403
commit acef22bbd2
14 files changed
+417 -225

No files matched your search

+2 -2
View File
@@ -54,7 +54,7 @@ use sp_staking::{
SessionIndex,
};
use super::{Call, Module, Config};
use super::{Call, Pallet, Config};
/// A trait with utility methods for handling equivocation reports in GRANDPA.
/// The offence type is generic, and the trait provides , reporting an offence
@@ -203,7 +203,7 @@ pub struct GrandpaTimeSlot {
/// A `ValidateUnsigned` implementation that restricts calls to `report_equivocation_unsigned`
/// to local calls (i.e. extrinsics generated on this node) or that already in a block. This
/// guarantees that only block authors can include unsigned equivocation reports.
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Module<T> {
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Pallet<T> {
type Call = Call<T>;
fn validate_unsigned(source: TransactionSource, call: &Self::Call) -> TransactionValidity {
if let Call::report_equivocation_unsigned(equivocation_proof, key_owner_proof) = call {