mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
add coordinator side rotation test
This commit is contained in:
@@ -14,7 +14,9 @@ use serai_client::{
|
||||
mod common;
|
||||
use common::validator_sets::{set_keys, allocate_stake, deallocate_stake};
|
||||
|
||||
const EPOCH_INTERVAL: u64 = 5;
|
||||
// TODO: get rid of this is constant and retrive the epoch numbers from sthe node directly
|
||||
// since epochs doesn't always change at the exact intervals.
|
||||
const EPOCH_INTERVAL: u64 = 300;
|
||||
|
||||
serai_test!(
|
||||
set_keys_test: (|serai: Serai| async move {
|
||||
|
||||
@@ -315,7 +315,7 @@ pub type ReportLongevity = <Runtime as pallet_babe::Config>::EpochDuration;
|
||||
impl babe::Config for Runtime {
|
||||
#[cfg(feature = "fast-epoch")]
|
||||
#[allow(clippy::identity_op)]
|
||||
type EpochDuration = ConstU64<{ DAYS / (24 * 60 * 2) }>; // 30 seconds
|
||||
type EpochDuration = ConstU64<{ DAYS / (24 * 2) }>; // 30 minutes
|
||||
|
||||
#[cfg(not(feature = "fast-epoch"))]
|
||||
#[allow(clippy::identity_op)]
|
||||
|
||||
@@ -652,7 +652,7 @@ pub mod pallet {
|
||||
// If not Serai, check the prior session had its keys cleared, which happens once its
|
||||
// retired
|
||||
return (network == NetworkId::Serai) ||
|
||||
(!Keys::<T>::contains_key(ValidatorSet {
|
||||
(Keys::<T>::contains_key(ValidatorSet {
|
||||
network,
|
||||
session: Session(current_session.0 - 1),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user