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:
@@ -13,7 +13,10 @@ pub mod pallet {
|
||||
|
||||
use serai_primitives::{NetworkId, Amount, PublicKey};
|
||||
|
||||
use validator_sets_pallet::{primitives::Session, Config as VsConfig, Pallet as VsPallet};
|
||||
use validator_sets_pallet::{
|
||||
primitives::{Session, ValidatorSet},
|
||||
Config as VsConfig, Pallet as VsPallet,
|
||||
};
|
||||
use pallet_session::{Config as SessionConfig, SessionManager};
|
||||
|
||||
#[pallet::error]
|
||||
@@ -183,7 +186,12 @@ pub mod pallet {
|
||||
Some(VsPallet::<T>::select_validators(NetworkId::Serai))
|
||||
}
|
||||
|
||||
fn end_session(_end_index: u32) {}
|
||||
fn end_session(end_index: u32) {
|
||||
VsPallet::<T>::retire_set(ValidatorSet {
|
||||
network: NetworkId::Serai,
|
||||
session: Session(end_index),
|
||||
})
|
||||
}
|
||||
|
||||
fn start_session(_start_index: u32) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user