Skip to content

Commit

Permalink
return early if receipts by logs block range is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Aug 22, 2023
1 parent c10eeb5 commit df14e1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/prune/src/pruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ impl<DB: Database> Pruner<DB> {
let mut last_pruned_transaction = None;
for (start_block, end_block, num_addresses) in block_ranges {
let block_range = start_block..=end_block;
if block_range.is_empty() {
trace!(target: "pruner", "No receipts by logs to prune");
return Ok(true)
}

let tx_range = match self.get_next_tx_num_range_from_checkpoint(
provider,
PrunePart::ContractLogs,
Expand Down

0 comments on commit df14e1e

Please sign in to comment.