mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add validator set rotation test for the node side (#532)
* add node side unit test * complete rotation test for all networks * set up the fast-epoch docker file * fix pr comments
This commit is contained in:
@@ -124,6 +124,8 @@ std = [
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
]
|
||||
|
||||
fast-epoch = []
|
||||
|
||||
runtime-benchmarks = [
|
||||
"sp-runtime/runtime-benchmarks",
|
||||
|
||||
|
||||
@@ -313,8 +313,14 @@ pub type MaxAuthorities = ConstU32<{ validator_sets::primitives::MAX_KEY_SHARES_
|
||||
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<{ 1 * DAYS }>;
|
||||
type EpochDuration = ConstU64<{ DAYS / (24 * 60 * 2) }>; // 30 seconds
|
||||
|
||||
#[cfg(not(feature = "fast-epoch"))]
|
||||
#[allow(clippy::identity_op)]
|
||||
type EpochDuration = ConstU64<{ DAYS }>;
|
||||
|
||||
type ExpectedBlockTime = ConstU64<{ TARGET_BLOCK_TIME * 1000 }>;
|
||||
type EpochChangeTrigger = babe::ExternalTrigger;
|
||||
type DisabledValidators = ValidatorSets;
|
||||
|
||||
Reference in New Issue
Block a user