Fix backfill stalling (#5192)
* Prevent early short circuit in `peer_disconnected` * lint
This commit is contained in:
parent
4db84de563
commit
0b59d10ab6
@ -332,7 +332,16 @@ impl<T: BeaconChainTypes> BackFillSync<T> {
|
||||
}
|
||||
// If we have run out of peers in which to retry this batch, the backfill state
|
||||
// transitions to a paused state.
|
||||
self.retry_batch_download(network, id)?;
|
||||
// We still need to reset the state for all the affected batches, so we should not
|
||||
// short circuit early
|
||||
if self.retry_batch_download(network, id).is_err() {
|
||||
debug!(
|
||||
self.log,
|
||||
"Batch could not be retried";
|
||||
"batch_id" => id,
|
||||
"error" => "no synced peers"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
debug!(self.log, "Batch not found while removing peer";
|
||||
"peer" => %peer_id, "batch" => id)
|
||||
|
Loading…
Reference in New Issue
Block a user