mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 14:54:45 +00:00
Allow validator client to start before genesis
This commit is contained in:
@@ -178,7 +178,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
genesis_state.genesis_time,
|
||||
Duration::from_millis(spec.milliseconds_per_slot),
|
||||
)
|
||||
.ok_or_else(|| Error::SlotClockDidNotStart)?;
|
||||
.map_err(|_| Error::SlotClockDidNotStart)?;
|
||||
|
||||
info!(log, "Beacon chain initialized from genesis";
|
||||
"validator_count" => genesis_state.validators.len(),
|
||||
@@ -220,7 +220,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
state.genesis_time,
|
||||
Duration::from_millis(spec.milliseconds_per_slot),
|
||||
)
|
||||
.ok_or_else(|| Error::SlotClockDidNotStart)?;
|
||||
.map_err(|_| Error::SlotClockDidNotStart)?;
|
||||
|
||||
let last_finalized_root = p.canonical_head.beacon_state.finalized_checkpoint.root;
|
||||
let last_finalized_block = &p.canonical_head.beacon_block;
|
||||
|
||||
Reference in New Issue
Block a user