chore: apply some style suggestions (#7307)

This commit is contained in:
Matthias Seitz
2024-03-24 23:52:33 +01:00
committed by GitHub
parent 7e6d61a66a
commit a31202670b
39 changed files with 184 additions and 182 deletions

View File

@ -1128,13 +1128,13 @@ where
if let Err((_hash, error)) =
self.try_make_sync_target_canonical(block_num_hash)
{
if error.is_fatal() {
return if error.is_fatal() {
error!(target: "consensus::engine", %error, "Encountered fatal error");
return Err(BeaconOnNewPayloadError::Internal(Box::new(error)))
Err(BeaconOnNewPayloadError::Internal(Box::new(error)))
} else {
// If we could not make the sync target block canonical, we
// should return the error as an invalid payload status.
return Ok(PayloadStatus::new(
Ok(PayloadStatus::new(
PayloadStatusEnum::Invalid {
validation_error: error.to_string(),
},
@ -2006,7 +2006,7 @@ mod tests {
let mut rx = spawn_consensus_engine(consensus_engine);
// consensus engine is idle
std::thread::sleep(Duration::from_millis(100));
tokio::time::sleep(Duration::from_millis(100)).await;
assert_matches!(rx.try_recv(), Err(TryRecvError::Empty));
// consensus engine is still idle because no FCUs were received