mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Formatting, fix CI failures
This commit is contained in:
@@ -47,7 +47,7 @@ test-ef-fake-crypto:
|
|||||||
GIT_SUBMODULE_STRATEGY: normal
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
script:
|
script:
|
||||||
- make make-ef-tests
|
- make make-ef-tests
|
||||||
- cargo test --manifest-path tests/ef_tests/Cargo.toml --release --features ef_tests fake_crypto
|
- cargo test --manifest-path tests/ef_tests/Cargo.toml --release --features ef_tests,fake_crypto
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
stage: document
|
stage: document
|
||||||
|
|||||||
@@ -146,9 +146,15 @@ impl<T: BeaconChainTypes + 'static> MessageHandler<T> {
|
|||||||
) {
|
) {
|
||||||
// an error could have occurred.
|
// an error could have occurred.
|
||||||
match error_response {
|
match error_response {
|
||||||
RPCErrorResponse::InvalidRequest(error) => warn!(self.log, "Peer indicated invalid request";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string()),
|
RPCErrorResponse::InvalidRequest(error) => {
|
||||||
RPCErrorResponse::ServerError(error) => warn!(self.log, "Peer internal server error";"peer_id" => format!("{:?}", peer_id), "error" => error.as_string()),
|
warn!(self.log, "Peer indicated invalid request";"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::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) => {
|
RPCErrorResponse::Success(response) => {
|
||||||
match response {
|
match response {
|
||||||
RPCResponse::Hello(hello_message) => {
|
RPCResponse::Hello(hello_message) => {
|
||||||
|
|||||||
@@ -578,7 +578,7 @@ mod tests {
|
|||||||
let mut builder = TestingAttestationBuilder::new(state, committee, slot, index);
|
let mut builder = TestingAttestationBuilder::new(state, committee, slot, index);
|
||||||
let signers = &committee[signing_range];
|
let signers = &committee[signing_range];
|
||||||
let committee_keys = signers.iter().map(|&i| &keypairs[i].sk).collect::<Vec<_>>();
|
let committee_keys = signers.iter().map(|&i| &keypairs[i].sk).collect::<Vec<_>>();
|
||||||
builder.sign(signers, &committee_keys, &state.fork, spec, false);
|
builder.sign(signers, &committee_keys, &state.fork, spec);
|
||||||
extra_signer.map(|c_idx| {
|
extra_signer.map(|c_idx| {
|
||||||
let validator_index = committee[c_idx];
|
let validator_index = committee[c_idx];
|
||||||
builder.sign(
|
builder.sign(
|
||||||
@@ -586,7 +586,6 @@ mod tests {
|
|||||||
&[&keypairs[validator_index].sk],
|
&[&keypairs[validator_index].sk],
|
||||||
&state.fork,
|
&state.fork,
|
||||||
spec,
|
spec,
|
||||||
false,
|
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
builder.build()
|
builder.build()
|
||||||
|
|||||||
@@ -68,10 +68,18 @@ impl<'a, B: BeaconNodeBlock, S: Signer, E: EthSpec> BlockProducer<'a, B, S, E> {
|
|||||||
"slot" => slot,
|
"slot" => slot,
|
||||||
),
|
),
|
||||||
Err(e) => error!(self.log, "Block production error"; "Error" => format!("{:?}", e)),
|
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::SignerRejection(_slot)) => {
|
||||||
Ok(ValidatorEvent::SlashableBlockNotProduced(_slot)) => error!(self.log, "Block production error"; "Error" => "Rejected the block as it could have been slashed".to_string()),
|
error!(self.log, "Block production error"; "Error" => "Signer Could not sign the block".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::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,8 +77,12 @@ impl<U: BeaconNodeDuties, S: Signer + Display> DutiesManager<U, S> {
|
|||||||
pub fn run_update(&self, epoch: Epoch, log: slog::Logger) -> Result<Async<()>, ()> {
|
pub fn run_update(&self, epoch: Epoch, log: slog::Logger) -> Result<Async<()>, ()> {
|
||||||
match self.update(epoch) {
|
match self.update(epoch) {
|
||||||
Err(error) => error!(log, "Epoch duties poll error"; "error" => format!("{:?}", error)),
|
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::NoChange(epoch)) => {
|
||||||
Ok(UpdateOutcome::DutiesChanged(epoch, duties)) => info!(log, "Duties changed (potential re-org)"; "epoch" => epoch, "duties" => format!("{:?}", duties)),
|
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)) => {
|
Ok(UpdateOutcome::NewDuties(epoch, duties)) => {
|
||||||
info!(log, "New duties obtained"; "epoch" => epoch);
|
info!(log, "New duties obtained"; "epoch" => epoch);
|
||||||
print_duties(&log, duties);
|
print_duties(&log, duties);
|
||||||
|
|||||||
Reference in New Issue
Block a user