mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-12 01:45:45 +00:00
Support variable session length for Rococo chains at genesis (#2167)
This pr adds support to change the session length of a Rococo chain at genesis. This is rather useful because Rococo has a session length of 1 hour, while on rococo-local you will now get 1 minute. This improves the dev experience, because a parachain is only going live at the start of a new session.
This commit is contained in:
@@ -33,7 +33,9 @@ pub mod time {
|
||||
use primitives::v0::{Moment, BlockNumber};
|
||||
pub const MILLISECS_PER_BLOCK: Moment = 6000;
|
||||
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
|
||||
pub const EPOCH_DURATION_IN_BLOCKS: BlockNumber = 1 * HOURS;
|
||||
frame_support::parameter_types! {
|
||||
pub storage EpochDurationInBlocks: BlockNumber = 1 * HOURS;
|
||||
}
|
||||
|
||||
// These time units are defined in number of blocks.
|
||||
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
|
||||
|
||||
Reference in New Issue
Block a user