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:
@@ -33,6 +33,13 @@ impl<'a> SeraiValidatorSets<'a> {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn set_retired_events(&self) -> Result<Vec<ValidatorSetsEvent>, SeraiError> {
|
||||
self
|
||||
.0
|
||||
.events::<ValidatorSets, _>(|event| matches!(event, ValidatorSetsEvent::SetRetired { .. }))
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn session(&self, network: NetworkId) -> Result<Option<Session>, SeraiError> {
|
||||
self.0.storage(PALLET, "CurrentSession", Some(vec![scale_value(network)])).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user