mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Remove un-used batch sync error condition (#6917)
- PR https://github.com/sigp/lighthouse/pull/6497 made obsolete some consistency checks inside the batch I forgot to remove the consumers of those errors Remove un-used batch sync error condition, which was a nested `Result<_, Result<_, E>>`
This commit is contained in:
@@ -422,24 +422,8 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
self.request_batches(network)?;
|
||||
self.process_completed_batches(network)
|
||||
}
|
||||
Err(result) => {
|
||||
let (expected_boundary, received_boundary, outcome) = match result {
|
||||
Err(e) => {
|
||||
self.fail_sync(BackFillError::BatchInvalidState(batch_id, e.0))?;
|
||||
return Ok(ProcessResult::Successful);
|
||||
}
|
||||
Ok(v) => v,
|
||||
};
|
||||
warn!(self.log, "Batch received out of range blocks"; "expected_boundary" => expected_boundary, "received_boundary" => received_boundary,
|
||||
"peer_id" => %peer_id, batch);
|
||||
|
||||
if let BatchOperationOutcome::Failed { blacklist: _ } = outcome {
|
||||
error!(self.log, "Backfill failed"; "epoch" => batch_id, "received_boundary" => received_boundary, "expected_boundary" => expected_boundary);
|
||||
self.fail_sync(BackFillError::BatchDownloadFailed(batch_id))?;
|
||||
return Ok(ProcessResult::Successful);
|
||||
}
|
||||
// this batch can't be used, so we need to request it again.
|
||||
self.retry_batch_download(network, batch_id)?;
|
||||
Err(e) => {
|
||||
self.fail_sync(BackFillError::BatchInvalidState(batch_id, e.0))?;
|
||||
Ok(ProcessResult::Successful)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user