mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Ran cargo fmt.
This commit is contained in:
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
|
||||
use attester::{BeaconNode, BeaconNodeError, PublishOutcome};
|
||||
use protos::services::ProduceAttestationDataRequest;
|
||||
use types::{AttestationData, Attestation, Slot};
|
||||
use types::{Attestation, AttestationData, Slot};
|
||||
|
||||
pub struct AttestationGrpcClient {
|
||||
client: Arc<AttestationServiceClient>,
|
||||
|
||||
@@ -44,7 +44,7 @@ impl EpochDuty {
|
||||
slot,
|
||||
shard: self.attestation_shard,
|
||||
committee_index: self.committee_index as usize,
|
||||
validator_index: self.validator_index as usize
|
||||
validator_index: self.validator_index as usize,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ impl<U: BeaconNode> DutiesManager<U> {
|
||||
Ok(Some(work_type)) => current_work.push((validator_signer.clone(), work_type)),
|
||||
Ok(None) => {} // No work for this validator
|
||||
//TODO: This should really log an error, as we shouldn't end up with an err here.
|
||||
Err(_) => {} // Unknown epoch or validator, no work
|
||||
Err(_) => {} // Unknown epoch or validator, no work
|
||||
}
|
||||
}
|
||||
if current_work.is_empty() {
|
||||
|
||||
@@ -20,6 +20,7 @@ use slog::{debug, error, info, warn};
|
||||
use slot_clock::{SlotClock, SystemTimeSlotClock};
|
||||
use std::sync::Arc;
|
||||
use std::sync::RwLock;
|
||||
use std::thread;
|
||||
use std::time::{Duration, Instant, SystemTime};
|
||||
use tokio::prelude::*;
|
||||
use tokio::runtime::Builder;
|
||||
@@ -27,7 +28,6 @@ use tokio::timer::Interval;
|
||||
use tokio_timer::clock::Clock;
|
||||
use types::test_utils::generate_deterministic_keypairs;
|
||||
use types::{Epoch, Fork, Slot};
|
||||
use std::thread;
|
||||
|
||||
//TODO: This service should be simplified in the future. Can be made more steamlined.
|
||||
|
||||
@@ -268,17 +268,11 @@ impl Service {
|
||||
// available AttestationDuty info
|
||||
let attestation_duty =
|
||||
work_type.attestation_duty.expect("Cannot be None");
|
||||
let attester_grpc_client =
|
||||
Arc::new(
|
||||
AttestationGrpcClient::new(
|
||||
service.attester_client.clone()
|
||||
)
|
||||
);
|
||||
let attester_grpc_client = Arc::new(AttestationGrpcClient::new(
|
||||
service.attester_client.clone(),
|
||||
));
|
||||
let signer = Arc::new(AttesterLocalSigner::new(keypair.clone()));
|
||||
let attester =
|
||||
Attester::new(
|
||||
attester_grpc_client,
|
||||
signer);
|
||||
let attester = Attester::new(attester_grpc_client, signer);
|
||||
let mut attester_service = AttesterService {
|
||||
attester,
|
||||
poll_interval_millis: POLL_INTERVAL_MILLIS,
|
||||
|
||||
Reference in New Issue
Block a user