Fix genesis time issue, add logs

This commit is contained in:
Paul Hauner 2019-04-01 08:59:59 +11:00
parent f4bd46fe66
commit b03dfdce59
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
2 changed files with 11 additions and 6 deletions

View File

@ -27,12 +27,22 @@ pub fn run_beacon_node(config: ClientConfig, log: &slog::Logger) -> error::Resul
match config.db_type {
DBType::RocksDB => {
info!(
log,
"BeaconNode starting";
"type" => "DiskDBTestingClientType"
);
let client: Client<DiskDBTestingClientType> =
Client::new(config, log.clone(), &executor)?;
run(client, executor, runtime, log)
}
DBType::Memory => {
info!(
log,
"BeaconNode starting";
"type" => "MemoryDBTestingClientType"
);
let client: Client<MemoryDBTestingClientType> =
Client::new(config, log.clone(), &executor)?;

View File

@ -122,12 +122,7 @@ impl TestingBeaconStateBuilder {
})
.collect();
let now = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap()
.as_secs()
- 30;
let genesis_time = now; // arbitrary
let genesis_time = 1554069200; // arbitrary
let mut state = BeaconState::genesis(
genesis_time,