rename EPOCH_DURATION_IN_BLOCKS -> EPOCH_DURATION_IN_SLOTS (#2674)

This commit is contained in:
Joshy Orndorff
2021-04-12 10:40:44 -04:00
committed by GitHub
parent d1d33abdf8
commit 849b5117f9
8 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ 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;
pub const EPOCH_DURATION_IN_SLOTS: BlockNumber = 1 * HOURS;
// These time units are defined in number of blocks.
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
+2 -2
View File
@@ -172,7 +172,7 @@ impl pallet_scheduler::Config for Runtime {
}
parameter_types! {
pub const EpochDuration: u64 = EPOCH_DURATION_IN_BLOCKS as u64;
pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64;
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
pub const ReportLongevity: u64 =
BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get();
@@ -337,7 +337,7 @@ impl pallet_session::historical::Config for Runtime {
parameter_types! {
// no signed phase for now, just unsigned.
pub const SignedPhase: u32 = 0;
pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_BLOCKS / 4;
pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
// fallback: run election on-chain.
pub const Fallback: pallet_election_provider_multi_phase::FallbackStrategy =