mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Refactor slot clock to remove underflow
Previously I had used `Instant` to refer to the genesis time.
This commit is contained in:
@@ -159,14 +159,11 @@ impl<B: BeaconNodeDuties + 'static, S: Signer + 'static, E: EthSpec> Service<B,
|
||||
};
|
||||
|
||||
// build the validator slot clock
|
||||
let slot_clock = SystemTimeSlotClock::from_eth2_genesis(
|
||||
let slot_clock = SystemTimeSlotClock::new(
|
||||
genesis_slot,
|
||||
genesis_time,
|
||||
Duration::from_secs(genesis_time),
|
||||
Duration::from_millis(eth2_config.spec.milliseconds_per_slot),
|
||||
)
|
||||
.map_err::<error_chain::Error, _>(|e| {
|
||||
format!("Unable to start slot clock: {}.", e).into()
|
||||
})?;
|
||||
);
|
||||
|
||||
/* Generate the duties manager */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user