Skip to content
Snippets Groups Projects
Commit 22e5e9b3 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

refac(smith-members): authority-members OnRemovedMember is no more used

parent e96f24bd
No related branches found
No related tags found
No related merge requests found
...@@ -69,7 +69,6 @@ pub mod pallet { ...@@ -69,7 +69,6 @@ pub mod pallet {
{ {
type IsMember: IsMember<Self::MemberId>; type IsMember: IsMember<Self::MemberId>;
type OnNewSession: OnNewSession; type OnNewSession: OnNewSession;
type OnRemovedMember: OnRemovedMember<Self::MemberId>;
type OnOutgoingMember: OnOutgoingMember<Self::MemberId>; type OnOutgoingMember: OnOutgoingMember<Self::MemberId>;
type OnIncomingMember: OnIncomingMember<Self::MemberId>; type OnIncomingMember: OnIncomingMember<Self::MemberId>;
type OnBlacklistedMember: OnBlacklistedMember<Self::MemberId>; type OnBlacklistedMember: OnBlacklistedMember<Self::MemberId>;
......
...@@ -156,7 +156,6 @@ impl pallet_authority_members::Config for Test { ...@@ -156,7 +156,6 @@ impl pallet_authority_members::Config for Test {
type MemberId = u64; type MemberId = u64;
type MemberIdOf = ConvertInto; type MemberIdOf = ConvertInto;
type OnNewSession = (); type OnNewSession = ();
type OnRemovedMember = ();
type RemoveMemberOrigin = system::EnsureRoot<u64>; type RemoveMemberOrigin = system::EnsureRoot<u64>;
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
......
...@@ -24,14 +24,6 @@ impl OnNewSession for () { ...@@ -24,14 +24,6 @@ impl OnNewSession for () {
fn on_new_session(_: SessionIndex) {} fn on_new_session(_: SessionIndex) {}
} }
pub trait OnRemovedMember<MemberId> {
fn on_removed_member(member_id: MemberId);
}
impl<MemberId> OnRemovedMember<MemberId> for () {
fn on_removed_member(_: MemberId) {}
}
/// Handle the consequences of a blacklisting for other pallets /// Handle the consequences of a blacklisting for other pallets
pub trait OnBlacklistedMember<MemberId> { pub trait OnBlacklistedMember<MemberId> {
fn on_blacklisted_member(member_id: MemberId); fn on_blacklisted_member(member_id: MemberId);
......
...@@ -185,7 +185,6 @@ impl pallet_authority_members::Config for Test { ...@@ -185,7 +185,6 @@ impl pallet_authority_members::Config for Test {
type MemberId = u32; type MemberId = u32;
type MemberIdOf = IdentityIndexOf<Self>; type MemberIdOf = IdentityIndexOf<Self>;
type OnNewSession = (); type OnNewSession = ();
type OnRemovedMember = ();
type RemoveMemberOrigin = system::EnsureRoot<AccountId>; type RemoveMemberOrigin = system::EnsureRoot<AccountId>;
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
......
...@@ -4,13 +4,6 @@ use pallet_authority_members::SessionIndex; ...@@ -4,13 +4,6 @@ use pallet_authority_members::SessionIndex;
use pallet_identity::IdtyEvent; use pallet_identity::IdtyEvent;
use sp_runtime::traits::Convert; use sp_runtime::traits::Convert;
/// We want to remove a Smith when he is removed from the higher level set of "authorities".
impl<T: Config> pallet_authority_members::OnRemovedMember<T::MemberId> for Pallet<T> {
fn on_removed_member(_: T::MemberId) {
todo!("Remove smith as well")
}
}
// TODO: /// or //! ? // TODO: /// or //! ?
/// We want to remove a Smith when he is removed (blacklisted) from the higher level set of "authorities". /// We want to remove a Smith when he is removed (blacklisted) from the higher level set of "authorities".
/// A blacklisting means the user does not respect the operational conditions for an authority, so /// A blacklisting means the user does not respect the operational conditions for an authority, so
......
...@@ -74,18 +74,6 @@ impl< ...@@ -74,18 +74,6 @@ impl<
} }
} }
// authority member removal handler
pub struct OnRemovedAuthorityMemberHandler<Runtime>(core::marker::PhantomData<Runtime>);
impl<Runtime> pallet_authority_members::traits::OnRemovedMember<Runtime::MemberId>
for OnRemovedAuthorityMemberHandler<Runtime>
where
Runtime: pallet_smith_members::Config,
{
fn on_removed_member(idty_index: Runtime::MemberId) {
pallet_smith_members::Pallet::<Runtime>::on_removed_member(idty_index);
}
}
// spend treasury handler // spend treasury handler
pub struct TreasurySpendFunds<Runtime>(core::marker::PhantomData<Runtime>); pub struct TreasurySpendFunds<Runtime>(core::marker::PhantomData<Runtime>);
impl<Runtime> pallet_treasury::SpendFunds<Runtime> for TreasurySpendFunds<Runtime> impl<Runtime> pallet_treasury::SpendFunds<Runtime> for TreasurySpendFunds<Runtime>
......
...@@ -235,7 +235,6 @@ macro_rules! pallets_config { ...@@ -235,7 +235,6 @@ macro_rules! pallets_config {
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type IsMember = SmithMembers; type IsMember = SmithMembers;
type OnNewSession = OnNewSessionHandler<Runtime>; type OnNewSession = OnNewSessionHandler<Runtime>;
type OnRemovedMember = OnRemovedAuthorityMemberHandler<Runtime>;
type MemberId = IdtyIndex; type MemberId = IdtyIndex;
type MemberIdOf = common_runtime::providers::IdentityIndexOf<Self>; type MemberIdOf = common_runtime::providers::IdentityIndexOf<Self>;
type MaxAuthorities = MaxAuthorities; type MaxAuthorities = MaxAuthorities;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment