mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 22:38:34 +00:00
Validator client fixes. Hack fix for genesis start time
This commit is contained in:
@@ -99,6 +99,9 @@ fn validate_attestation_parametric(
|
||||
crosslink_data_root: attestation.data.crosslink_data_root,
|
||||
epoch: attestation.data.slot.epoch(spec.slots_per_epoch),
|
||||
};
|
||||
dbg!(attestation.clone());
|
||||
dbg!(state.latest_crosslinks[attestation.data.shard as usize].clone());
|
||||
dbg!(potential_crosslink.clone());
|
||||
verify!(
|
||||
(attestation.data.previous_crosslink
|
||||
== state.latest_crosslinks[attestation.data.shard as usize])
|
||||
|
||||
@@ -6,6 +6,8 @@ use dirs;
|
||||
use log::debug;
|
||||
use rayon::prelude::*;
|
||||
use std::path::{Path, PathBuf};
|
||||
//TODO: testing only
|
||||
use std::time::{Duration, SystemTime};
|
||||
|
||||
pub const KEYPAIRS_FILE: &str = "keypairs.raw_keypairs";
|
||||
|
||||
@@ -120,7 +122,13 @@ impl TestingBeaconStateBuilder {
|
||||
})
|
||||
.collect();
|
||||
|
||||
let genesis_time = 1553977336; // arbitrary
|
||||
//TODO: Testing only
|
||||
let now = SystemTime::now()
|
||||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_secs()
|
||||
- 30;
|
||||
let genesis_time = now; // arbitrary
|
||||
|
||||
let mut state = BeaconState::genesis(
|
||||
genesis_time,
|
||||
|
||||
Reference in New Issue
Block a user