Skip to content

Commit

Permalink
Prevent early short circuit in peer_disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Feb 5, 2024
1 parent 8fa11aa commit 0e3175c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion beacon_node/network/src/sync/backfill_sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 let Err(e) = self.retry_batch_download(network, id) {
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)
Expand Down

0 comments on commit 0e3175c

Please sign in to comment.