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

Commit ce0b69a

Browse files
Migrate pallet-babe to pallet attribute macro. (#8310)
* Migrate pallet-babe to pallet attribute macro. * Remove unnecessary bound in pallet storage. Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
1 parent de96cf8 commit ce0b69a

File tree

6 files changed

+325
-269
lines changed

6 files changed

+325
-269
lines changed

frame/babe/src/benchmarking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mod tests {
9191
let equivocation_proof = generate_equivocation_proof(
9292
offending_authority_index,
9393
offending_authority_pair,
94-
CurrentSlot::get() + 1,
94+
CurrentSlot::<Test>::get() + 1,
9595
);
9696

9797
println!("equivocation_proof: {:?}", equivocation_proof);

frame/babe/src/equivocation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use sp_staking::{
4848
};
4949
use sp_std::prelude::*;
5050

51-
use crate::{Call, Module, Config};
51+
use crate::{Call, Pallet, Config};
5252

5353
/// A trait with utility methods for handling equivocation reports in BABE.
5454
/// The trait provides methods for reporting an offence triggered by a valid
@@ -182,7 +182,7 @@ where
182182
/// A `ValidateUnsigned` implementation that restricts calls to `report_equivocation_unsigned`
183183
/// to local calls (i.e. extrinsics generated on this node) or that already in a block. This
184184
/// guarantees that only block authors can include unsigned equivocation reports.
185-
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Module<T> {
185+
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Pallet<T> {
186186
type Call = Call<T>;
187187
fn validate_unsigned(source: TransactionSource, call: &Self::Call) -> TransactionValidity {
188188
if let Call::report_equivocation_unsigned(equivocation_proof, key_owner_proof) = call {

0 commit comments

Comments
 (0)