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:
Lion - dapplion
2025-02-07 04:48:58 -03:00
committed by GitHub
parent 7408719de8
commit 921d95217d
3 changed files with 18 additions and 56 deletions

View File

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