diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index 99babcc97e192f3db0c2d9f6ae3a6bd87e88a704..f06f9d398821c3abadddcddc8ac2d9bae45d1f30 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -485,14 +485,14 @@ pub mod pallet { } /// Check if member is incoming. - fn is_incoming(member_id: &T::MemberId) -> bool { + pub fn is_incoming(member_id: &T::MemberId) -> bool { IncomingAuthorities::<T>::get() .binary_search(member_id) .is_ok() } - /// C&heck if member is online. - fn is_online(member_id: &T::MemberId) -> bool { + /// Check if member is online. + pub fn is_online(member_id: &T::MemberId) -> bool { OnlineAuthorities::<T>::get() .binary_search(member_id) .is_ok() diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index 078bb6d7c28e01178db82b17c0e42c7ca0c2a315..c056d983341ce3f427348623ba86b1701cf6aa3c 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -178,7 +178,8 @@ impl< for OwnerKeyChangePermissionHandler<Runtime> { fn check_allowed(idty_index: &IdtyIndex) -> bool { - !pallet_authority_members::Pallet::<Runtime>::online().contains(idty_index) + !pallet_authority_members::Pallet::<Runtime>::is_online(idty_index) + && !pallet_authority_members::Pallet::<Runtime>::is_incoming(idty_index) } }