Skip to content

Commit

Permalink
fix(stages): division by zero in headers progress
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Jan 28, 2024
1 parent bd26c69 commit c552897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/stages/src/stages/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ where
// Although headers were downloaded in reverse order, the collector iterates it in ascending
// order

let interval = total_headers / 10;
let interval = (total_headers / 10).max(1);
for (index, header) in self.header_collector.iter()?.enumerate() {
let (number, header_buf) = header?;

Expand Down

0 comments on commit c552897

Please sign in to comment.