Skip to content

Commit

Permalink
check empty tx range
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Aug 22, 2023
1 parent 0498b18 commit a092d72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/prune/src/pruner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,12 @@ impl<DB: Database> Pruner<DB> {
}
.last_tx_num();

Ok(Some(from_tx_number..=to_tx_number))
let range = from_tx_number..=to_tx_number;
if range.is_empty() {
return Ok(None)
}

Ok(Some(range))
}

/// Prune receipts up to the provided block, inclusive, respecting the batch size.
Expand Down

0 comments on commit a092d72

Please sign in to comment.