Run rustfmt
This commit is contained in:
parent
23bcf9fe6f
commit
81325a0e05
@ -146,15 +146,9 @@ impl<T: BeaconChainTypes + 'static> MessageHandler<T> {
|
||||
) {
|
||||
// an error could have occurred.
|
||||
match error_response {
|
||||
RPCErrorResponse::InvalidRequest(error) => {
|
||||
warn!(self.log, "Peer indicated invalid request";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string())
|
||||
}
|
||||
RPCErrorResponse::ServerError(error) => {
|
||||
warn!(self.log, "Peer internal server error";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string())
|
||||
}
|
||||
RPCErrorResponse::Unknown(error) => {
|
||||
warn!(self.log, "Unknown peer error";"peer" => format!("{:?}", peer_id), "error" => error.as_string())
|
||||
}
|
||||
RPCErrorResponse::InvalidRequest(error) => warn!(self.log, "Peer indicated invalid request";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string()),
|
||||
RPCErrorResponse::ServerError(error) => warn!(self.log, "Peer internal server error";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string()),
|
||||
RPCErrorResponse::Unknown(error) => warn!(self.log, "Unknown peer error";"peer" => format!("{:?}", peer_id), "error" => error.as_string()),
|
||||
RPCErrorResponse::Success(response) => {
|
||||
match response {
|
||||
RPCResponse::Hello(hello_message) => {
|
||||
|
@ -58,5 +58,4 @@ mod tests {
|
||||
use crate::*;
|
||||
|
||||
ssz_tests!(Attestation<MainnetEthSpec>);
|
||||
|
||||
}
|
||||
|
@ -19,5 +19,4 @@ mod test {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(AttestationDataAndCustodyBit);
|
||||
|
||||
}
|
||||
|
@ -21,5 +21,4 @@ mod tests {
|
||||
use crate::*;
|
||||
|
||||
ssz_tests!(AttesterSlashing<MainnetEthSpec>);
|
||||
|
||||
}
|
||||
|
@ -32,5 +32,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(Checkpoint);
|
||||
|
||||
}
|
||||
|
@ -37,5 +37,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(Crosslink);
|
||||
|
||||
}
|
||||
|
@ -21,5 +21,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(Deposit);
|
||||
|
||||
}
|
||||
|
@ -55,5 +55,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(DepositData);
|
||||
|
||||
}
|
||||
|
@ -23,5 +23,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(Eth1Data);
|
||||
|
||||
}
|
||||
|
@ -23,5 +23,4 @@ mod tests {
|
||||
pub type FoundationHistoricalBatch = HistoricalBatch<MainnetEthSpec>;
|
||||
|
||||
ssz_tests!(FoundationHistoricalBatch);
|
||||
|
||||
}
|
||||
|
@ -23,5 +23,4 @@ mod tests {
|
||||
use crate::*;
|
||||
|
||||
ssz_tests!(PendingAttestation<MainnetEthSpec>);
|
||||
|
||||
}
|
||||
|
@ -21,5 +21,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(ProposerSlashing);
|
||||
|
||||
}
|
||||
|
@ -42,5 +42,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(Transfer);
|
||||
|
||||
}
|
||||
|
@ -117,5 +117,4 @@ mod tests {
|
||||
}
|
||||
|
||||
ssz_tests!(Validator);
|
||||
|
||||
}
|
||||
|
@ -35,5 +35,4 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
ssz_tests!(VoluntaryExit);
|
||||
|
||||
}
|
||||
|
@ -57,21 +57,11 @@ impl<'a, B: BeaconNodeAttestation, S: Signer, E: EthSpec> AttestationProducer<'a
|
||||
"slot" => slot,
|
||||
),
|
||||
Err(e) => error!(log, "Attestation production error"; "Error" => format!("{:?}", e)),
|
||||
Ok(ValidatorEvent::SignerRejection(_slot)) => {
|
||||
error!(log, "Attestation production error"; "Error" => "Signer could not sign the attestation".to_string())
|
||||
}
|
||||
Ok(ValidatorEvent::IndexedAttestationNotProduced(_slot)) => {
|
||||
error!(log, "Attestation production error"; "Error" => "Rejected the attestation as it could have been slashed".to_string())
|
||||
}
|
||||
Ok(ValidatorEvent::PublishAttestationFailed) => {
|
||||
error!(log, "Attestation production error"; "Error" => "Beacon node was unable to publish an attestation".to_string())
|
||||
}
|
||||
Ok(ValidatorEvent::InvalidAttestation) => {
|
||||
error!(log, "Attestation production error"; "Error" => "The signed attestation was invalid".to_string())
|
||||
}
|
||||
Ok(v) => {
|
||||
warn!(log, "Unknown result for attestation production"; "Error" => format!("{:?}",v))
|
||||
}
|
||||
Ok(ValidatorEvent::SignerRejection(_slot)) => error!(log, "Attestation production error"; "Error" => "Signer could not sign the attestation".to_string()),
|
||||
Ok(ValidatorEvent::IndexedAttestationNotProduced(_slot)) => error!(log, "Attestation production error"; "Error" => "Rejected the attestation as it could have been slashed".to_string()),
|
||||
Ok(ValidatorEvent::PublishAttestationFailed) => error!(log, "Attestation production error"; "Error" => "Beacon node was unable to publish an attestation".to_string()),
|
||||
Ok(ValidatorEvent::InvalidAttestation) => error!(log, "Attestation production error"; "Error" => "The signed attestation was invalid".to_string()),
|
||||
Ok(v) => warn!(log, "Unknown result for attestation production"; "Error" => format!("{:?}",v)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,18 +69,10 @@ impl<'a, B: BeaconNodeBlock, S: Signer, E: EthSpec> BlockProducer<'a, B, S, E> {
|
||||
"slot" => slot,
|
||||
),
|
||||
Err(e) => error!(self.log, "Block production error"; "Error" => format!("{:?}", e)),
|
||||
Ok(ValidatorEvent::SignerRejection(_slot)) => {
|
||||
error!(self.log, "Block production error"; "Error" => "Signer Could not sign the block".to_string())
|
||||
}
|
||||
Ok(ValidatorEvent::SlashableBlockNotProduced(_slot)) => {
|
||||
error!(self.log, "Block production error"; "Error" => "Rejected the block as it could have been slashed".to_string())
|
||||
}
|
||||
Ok(ValidatorEvent::BeaconNodeUnableToProduceBlock(_slot)) => {
|
||||
error!(self.log, "Block production error"; "Error" => "Beacon node was unable to produce a block".to_string())
|
||||
}
|
||||
Ok(v) => {
|
||||
warn!(self.log, "Unknown result for block production"; "Error" => format!("{:?}",v))
|
||||
}
|
||||
Ok(ValidatorEvent::SignerRejection(_slot)) => error!(self.log, "Block production error"; "Error" => "Signer Could not sign the block".to_string()),
|
||||
Ok(ValidatorEvent::SlashableBlockNotProduced(_slot)) => error!(self.log, "Block production error"; "Error" => "Rejected the block as it could have been slashed".to_string()),
|
||||
Ok(ValidatorEvent::BeaconNodeUnableToProduceBlock(_slot)) => error!(self.log, "Block production error"; "Error" => "Beacon node was unable to produce a block".to_string()),
|
||||
Ok(v) => warn!(self.log, "Unknown result for block production"; "Error" => format!("{:?}",v)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,12 +77,8 @@ impl<U: BeaconNodeDuties, S: Signer + Display> DutiesManager<U, S> {
|
||||
pub fn run_update(&self, epoch: Epoch, log: slog::Logger) -> Result<Async<()>, ()> {
|
||||
match self.update(epoch) {
|
||||
Err(error) => error!(log, "Epoch duties poll error"; "error" => format!("{:?}", error)),
|
||||
Ok(UpdateOutcome::NoChange(epoch)) => {
|
||||
debug!(log, "No change in duties"; "epoch" => epoch)
|
||||
}
|
||||
Ok(UpdateOutcome::DutiesChanged(epoch, duties)) => {
|
||||
info!(log, "Duties changed (potential re-org)"; "epoch" => epoch, "duties" => format!("{:?}", duties))
|
||||
}
|
||||
Ok(UpdateOutcome::NoChange(epoch)) => debug!(log, "No change in duties"; "epoch" => epoch),
|
||||
Ok(UpdateOutcome::DutiesChanged(epoch, duties)) => info!(log, "Duties changed (potential re-org)"; "epoch" => epoch, "duties" => format!("{:?}", duties)),
|
||||
Ok(UpdateOutcome::NewDuties(epoch, duties)) => {
|
||||
info!(log, "New duties obtained"; "epoch" => epoch);
|
||||
print_duties(&log, duties);
|
||||
|
Loading…
Reference in New Issue
Block a user