mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Merge remote-tracking branch 'origin/master' into spec-0.6
This commit is contained in:
@@ -13,8 +13,6 @@ name = "validator_client"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
block_proposer = { path = "../eth2/block_proposer" }
|
||||
attester = { path = "../eth2/attester" }
|
||||
bls = { path = "../eth2/utils/bls" }
|
||||
ssz = { path = "../eth2/utils/ssz" }
|
||||
tree_hash = { path = "../eth2/utils/tree_hash" }
|
||||
|
||||
@@ -6,7 +6,9 @@ use std::fs;
|
||||
use std::fs::File;
|
||||
use std::io::{Error, ErrorKind};
|
||||
use std::path::PathBuf;
|
||||
use types::ChainSpec;
|
||||
use types::{
|
||||
ChainSpec, EthSpec, FewValidatorsEthSpec, FoundationEthSpec, LighthouseTestnetEthSpec,
|
||||
};
|
||||
|
||||
/// Stores the core configuration for this validator instance.
|
||||
#[derive(Clone)]
|
||||
@@ -31,7 +33,7 @@ impl Default for Config {
|
||||
|
||||
let server = "localhost:5051".to_string();
|
||||
|
||||
let spec = ChainSpec::foundation();
|
||||
let spec = FoundationEthSpec::spec();
|
||||
|
||||
Self {
|
||||
data_dir,
|
||||
@@ -65,9 +67,9 @@ impl Config {
|
||||
if let Some(spec_str) = args.value_of("spec") {
|
||||
info!(log, "Using custom spec: {:?}", spec_str);
|
||||
config.spec = match spec_str {
|
||||
"foundation" => ChainSpec::foundation(),
|
||||
"few_validators" => ChainSpec::few_validators(),
|
||||
"lighthouse_testnet" => ChainSpec::lighthouse_testnet(),
|
||||
"foundation" => FoundationEthSpec::spec(),
|
||||
"few_validators" => FewValidatorsEthSpec::spec(),
|
||||
"lighthouse_testnet" => LighthouseTestnetEthSpec::spec(),
|
||||
// Should be impossible due to clap's `possible_values(..)` function.
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ impl<U: BeaconNodeDuties, S: Signer + Display> DutiesManager<U, S> {
|
||||
///
|
||||
/// be a wall-clock (e.g., system time, remote server time, etc.).
|
||||
fn update(&self, epoch: Epoch) -> Result<UpdateOutcome, Error> {
|
||||
let public_keys: Vec<PublicKey> = self.signers.iter().map(|s| s.to_public()).collect();
|
||||
let public_keys: Vec<PublicKey> = self.signers.iter().map(Signer::to_public).collect();
|
||||
let duties = self.beacon_node.request_duties(epoch, &public_keys)?;
|
||||
{
|
||||
// If these duties were known, check to see if they're updates or identical.
|
||||
|
||||
@@ -31,7 +31,6 @@ use tokio::prelude::*;
|
||||
use tokio::runtime::Builder;
|
||||
use tokio::timer::Interval;
|
||||
use tokio_timer::clock::Clock;
|
||||
use types::test_utils::generate_deterministic_keypairs;
|
||||
use types::{ChainSpec, Epoch, Fork, Slot};
|
||||
|
||||
/// A fixed amount of time after a slot to perform operations. This gives the node time to complete
|
||||
|
||||
Reference in New Issue
Block a user