Fix genesis time issue, add logs
This commit is contained in:
parent
f4bd46fe66
commit
b03dfdce59
@ -27,12 +27,22 @@ pub fn run_beacon_node(config: ClientConfig, log: &slog::Logger) -> error::Resul
|
|||||||
|
|
||||||
match config.db_type {
|
match config.db_type {
|
||||||
DBType::RocksDB => {
|
DBType::RocksDB => {
|
||||||
|
info!(
|
||||||
|
log,
|
||||||
|
"BeaconNode starting";
|
||||||
|
"type" => "DiskDBTestingClientType"
|
||||||
|
);
|
||||||
let client: Client<DiskDBTestingClientType> =
|
let client: Client<DiskDBTestingClientType> =
|
||||||
Client::new(config, log.clone(), &executor)?;
|
Client::new(config, log.clone(), &executor)?;
|
||||||
|
|
||||||
run(client, executor, runtime, log)
|
run(client, executor, runtime, log)
|
||||||
}
|
}
|
||||||
DBType::Memory => {
|
DBType::Memory => {
|
||||||
|
info!(
|
||||||
|
log,
|
||||||
|
"BeaconNode starting";
|
||||||
|
"type" => "MemoryDBTestingClientType"
|
||||||
|
);
|
||||||
let client: Client<MemoryDBTestingClientType> =
|
let client: Client<MemoryDBTestingClientType> =
|
||||||
Client::new(config, log.clone(), &executor)?;
|
Client::new(config, log.clone(), &executor)?;
|
||||||
|
|
||||||
|
@ -122,12 +122,7 @@ impl TestingBeaconStateBuilder {
|
|||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let now = SystemTime::now()
|
let genesis_time = 1554069200; // arbitrary
|
||||||
.duration_since(SystemTime::UNIX_EPOCH)
|
|
||||||
.unwrap()
|
|
||||||
.as_secs()
|
|
||||||
- 30;
|
|
||||||
let genesis_time = now; // arbitrary
|
|
||||||
|
|
||||||
let mut state = BeaconState::genesis(
|
let mut state = BeaconState::genesis(
|
||||||
genesis_time,
|
genesis_time,
|
||||||
|
Loading…
Reference in New Issue
Block a user