Ran cargo fmt.

This commit is contained in:
Luke Anderson
2019-03-28 21:01:47 +11:00
parent 867af4bc6a
commit 87acaac8a0
9 changed files with 38 additions and 51 deletions

View File

@@ -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>,

View File

@@ -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,
});
}

View File

@@ -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() {

View File

@@ -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,