Skip to content

Commit 93b8577

Browse files
committed
fix
1 parent 18f5e0b commit 93b8577

File tree

1 file changed

+3
-1
lines changed
  • rust/cardano-chain-follower/src/turbo_downloader

1 file changed

+3
-1
lines changed

rust/cardano-chain-follower/src/turbo_downloader/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ impl ParallelDownloadProcessor {
513513
work_queue: &crossbeam_channel::Receiver<DlWorkOrder>,
514514
chain: &Network,
515515
) {
516+
const GET_RANGE_NUM_OF_TRIES: u8 = 5;
517+
516518
debug!("Worker {worker_id} started");
517519

518520
// Each worker has its own http_client, so there is no cross worker pathology
@@ -538,7 +540,7 @@ impl ParallelDownloadProcessor {
538540
}
539541
let mut block = None;
540542
// debug!("Worker {worker_id} DL chunk {next_chunk}");
541-
for attempt in 1u8..6 {
543+
for attempt in 1u8..=GET_RANGE_NUM_OF_TRIES {
542544
block = match params.get_range(&http_agent, next_chunk) {
543545
Ok(block) => Some(block),
544546
Err(error) => {

0 commit comments

Comments
 (0)