diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index f57ff7d39550e8af9c5b80ae1b86c2cf8702602e..006dd1bb007fd0ab5954dda5f423c46b249f782d 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -69,7 +69,6 @@ pub mod pallet { { type IsMember: IsMember<Self::MemberId>; type OnNewSession: OnNewSession; - type OnRemovedMember: OnRemovedMember<Self::MemberId>; type OnOutgoingMember: OnOutgoingMember<Self::MemberId>; type OnIncomingMember: OnIncomingMember<Self::MemberId>; type OnBlacklistedMember: OnBlacklistedMember<Self::MemberId>; diff --git a/pallets/authority-members/src/mock.rs b/pallets/authority-members/src/mock.rs index c5aaa5f2db06d96f03206d94349cee0e831950c0..d5be56ef936408527d2cbfe6a54c4dc2beecd6f9 100644 --- a/pallets/authority-members/src/mock.rs +++ b/pallets/authority-members/src/mock.rs @@ -156,7 +156,6 @@ impl pallet_authority_members::Config for Test { type MemberId = u64; type MemberIdOf = ConvertInto; type OnNewSession = (); - type OnRemovedMember = (); type RemoveMemberOrigin = system::EnsureRoot<u64>; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); diff --git a/pallets/authority-members/src/traits.rs b/pallets/authority-members/src/traits.rs index 639ef95df0b0bfc94434137df489064b4dd5a7d7..2b1331e4e89e9fcae70bba91f1f3d70571c670f5 100644 --- a/pallets/authority-members/src/traits.rs +++ b/pallets/authority-members/src/traits.rs @@ -24,14 +24,6 @@ impl OnNewSession for () { 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 pub trait OnBlacklistedMember<MemberId> { fn on_blacklisted_member(member_id: MemberId); diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index bb020190aef70365eb2373e77eab53cfbfea0bc4..9c181921edf87f4643a99aa818ea4c4beffb8559 100644 --- a/pallets/distance/src/mock.rs +++ b/pallets/distance/src/mock.rs @@ -185,7 +185,6 @@ impl pallet_authority_members::Config for Test { type MemberId = u32; type MemberIdOf = IdentityIndexOf<Self>; type OnNewSession = (); - type OnRemovedMember = (); type RemoveMemberOrigin = system::EnsureRoot<AccountId>; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); diff --git a/pallets/smith-members/src/impls.rs b/pallets/smith-members/src/impls.rs index 937aa5104175cb9ad938c19c7dccc4cbcc04b294..7384ec4218f47342a477452e792418ec586ab596 100644 --- a/pallets/smith-members/src/impls.rs +++ b/pallets/smith-members/src/impls.rs @@ -4,13 +4,6 @@ use pallet_authority_members::SessionIndex; use pallet_identity::IdtyEvent; 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 //! ? /// 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 diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index 5a5fc2ebda7c3e1f55840f4bfc68a63d32d2290d..cb01cd3c48710eabbf4bf48e07bd06a5dd8da225 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -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 pub struct TreasurySpendFunds<Runtime>(core::marker::PhantomData<Runtime>); impl<Runtime> pallet_treasury::SpendFunds<Runtime> for TreasurySpendFunds<Runtime> diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 8121de9653a4c327320219a40d7e2549301e84b9..d06f97da0f02b81ca3c83a6247f4e1faa98632b4 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -235,7 +235,6 @@ macro_rules! pallets_config { type RuntimeEvent = RuntimeEvent; type IsMember = SmithMembers; type OnNewSession = OnNewSessionHandler<Runtime>; - type OnRemovedMember = OnRemovedAuthorityMemberHandler<Runtime>; type MemberId = IdtyIndex; type MemberIdOf = common_runtime::providers::IdentityIndexOf<Self>; type MaxAuthorities = MaxAuthorities;