mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
Replace INTERVALS_PER_SLOT with explicit slot component times (#7944)
https://github.com/ethereum/consensus-specs/pull/4476 Co-Authored-By: Barnabas Busa <barnabas.busa@ethereum.org> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -52,7 +52,7 @@ use types::{
|
||||
|
||||
type E = MainnetEthSpec;
|
||||
|
||||
const SECONDS_PER_SLOT: u64 = 12;
|
||||
const SLOT_DURATION_MS: u64 = 12_000;
|
||||
const SLOTS_PER_EPOCH: u64 = 32;
|
||||
const VALIDATOR_COUNT: usize = SLOTS_PER_EPOCH as usize;
|
||||
const CHAIN_LENGTH: u64 = SLOTS_PER_EPOCH * 5 - 1; // Make `next_block` an epoch transition
|
||||
@@ -323,7 +323,7 @@ impl ApiTester {
|
||||
|
||||
let client = BeaconNodeHttpClient::new(
|
||||
beacon_url,
|
||||
Timeouts::set_all(Duration::from_secs(SECONDS_PER_SLOT)),
|
||||
Timeouts::set_all(Duration::from_millis(SLOT_DURATION_MS)),
|
||||
);
|
||||
|
||||
Self {
|
||||
@@ -411,7 +411,7 @@ impl ApiTester {
|
||||
listening_socket.port()
|
||||
))
|
||||
.unwrap(),
|
||||
Timeouts::set_all(Duration::from_secs(SECONDS_PER_SLOT)),
|
||||
Timeouts::set_all(Duration::from_millis(SLOT_DURATION_MS)),
|
||||
);
|
||||
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user