mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Most of coordinator Tributary retiry
Adds Event::SetRetired to validator-sets. Emit TributaryRetired. Replaces is_active_set, which made multiple network requests, with is_retired_tributary, a DB read. Performs most of the removals necessary upon TributaryRetired. Still needs to clean up the actual Tributary/Tendermint tasks.
This commit is contained in:
@@ -235,6 +235,7 @@ pub mod pallet {
|
||||
pub enum Event<T: Config> {
|
||||
NewSet { set: ValidatorSet },
|
||||
KeyGen { set: ValidatorSet, key_pair: KeyPair },
|
||||
SetRetired { set: ValidatorSet },
|
||||
}
|
||||
|
||||
impl<T: Config> Pallet<T> {
|
||||
@@ -592,10 +593,10 @@ pub mod pallet {
|
||||
Self::participants(network).into()
|
||||
}
|
||||
|
||||
pub fn retire_session(network: NetworkId, session: Session) {
|
||||
let set = ValidatorSet { network, session };
|
||||
pub fn retire_set(set: ValidatorSet) {
|
||||
MuSigKeys::<T>::remove(set);
|
||||
Keys::<T>::remove(set);
|
||||
Pallet::<T>::deposit_event(Event::SetRetired { set });
|
||||
}
|
||||
|
||||
/// Take the amount deallocatable.
|
||||
|
||||
Reference in New Issue
Block a user