mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -54,13 +54,13 @@ use sp_staking::{
|
||||
SessionIndex,
|
||||
};
|
||||
|
||||
use super::{Call, Module, Trait};
|
||||
use super::{Call, Module, Config};
|
||||
|
||||
/// A trait with utility methods for handling equivocation reports in GRANDPA.
|
||||
/// The offence type is generic, and the trait provides , reporting an offence
|
||||
/// triggered by a valid equivocation report, and also for creating and
|
||||
/// submitting equivocation report extrinsics (useful only in offchain context).
|
||||
pub trait HandleEquivocation<T: Trait> {
|
||||
pub trait HandleEquivocation<T: Config> {
|
||||
/// The offence type used for reporting offences on valid equivocation reports.
|
||||
type Offence: GrandpaOffence<T::KeyOwnerIdentification>;
|
||||
|
||||
@@ -86,7 +86,7 @@ pub trait HandleEquivocation<T: Trait> {
|
||||
fn block_author() -> Option<T::AccountId>;
|
||||
}
|
||||
|
||||
impl<T: Trait> HandleEquivocation<T> for () {
|
||||
impl<T: Config> HandleEquivocation<T> for () {
|
||||
type Offence = GrandpaEquivocationOffence<T::KeyOwnerIdentification>;
|
||||
|
||||
fn report_offence(
|
||||
@@ -136,7 +136,7 @@ where
|
||||
// We use the authorship pallet to fetch the current block author and use
|
||||
// `offchain::SendTransactionTypes` for unsigned extrinsic creation and
|
||||
// submission.
|
||||
T: Trait + pallet_authorship::Trait + frame_system::offchain::SendTransactionTypes<Call<T>>,
|
||||
T: Config + pallet_authorship::Config + frame_system::offchain::SendTransactionTypes<Call<T>>,
|
||||
// A system for reporting offences after valid equivocation reports are
|
||||
// processed.
|
||||
R: ReportOffence<T::AccountId, T::KeyOwnerIdentification, O>,
|
||||
@@ -187,7 +187,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: Trait> frame_support::unsigned::ValidateUnsigned for Module<T> {
|
||||
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Module<T> {
|
||||
type Call = Call<T>;
|
||||
fn validate_unsigned(source: TransactionSource, call: &Self::Call) -> TransactionValidity {
|
||||
if let Call::report_equivocation_unsigned(equivocation_proof, _) = call {
|
||||
|
||||
Reference in New Issue
Block a user