mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Update validator_client for spec v0.2.0
This commit is contained in:
@@ -88,9 +88,12 @@ fn main() {
|
||||
let spec = Arc::new(ChainSpec::foundation());
|
||||
|
||||
// Clock for determining the present slot.
|
||||
// TODO: this shouldn't be a static time, instead it should be pulled from the beacon node.
|
||||
// https://github.com/sigp/lighthouse/issues/160
|
||||
let genesis_time = 1_549_935_547;
|
||||
let slot_clock = {
|
||||
info!(log, "Genesis time"; "unix_epoch_seconds" => spec.genesis_time);
|
||||
let clock = SystemTimeSlotClock::new(spec.genesis_time, spec.slot_duration)
|
||||
info!(log, "Genesis time"; "unix_epoch_seconds" => genesis_time);
|
||||
let clock = SystemTimeSlotClock::new(genesis_time, spec.slot_duration)
|
||||
.expect("Unable to instantiate SystemTimeSlotClock.");
|
||||
Arc::new(clock)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user