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

@@ -271,10 +271,7 @@ impl<E: EthSpec, B: BatchConfig> BatchInfo<E, B> {
pub fn download_completed(
&mut self,
blocks: Vec<RpcBlock<E>>,
) -> Result<
usize, /* Received blocks */
Result<(Slot, Slot, BatchOperationOutcome), WrongState>,
> {
) -> Result<usize /* Received blocks */, WrongState> {
match self.state.poison() {
BatchState::Downloading(peer, _request_id) => {
let received = blocks.len();
@@ -284,10 +281,10 @@ impl<E: EthSpec, B: BatchConfig> BatchInfo<E, B> {
BatchState::Poisoned => unreachable!("Poisoned batch"),
other => {
self.state = other;
Err(Err(WrongState(format!(
Err(WrongState(format!(
"Download completed for batch in wrong state {:?}",
self.state
))))
)))
}
}
}