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:
@@ -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
|
||||
))))
|
||||
)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user