mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-10 15:58:27 -05:00
fix(era-utils): fix off-by-one for Excluded end bound in process_iter (#18731)
Co-authored-by: Roman Hodulák <roman.hodulak@polyglot-software.com>
This commit is contained in:
@@ -286,12 +286,12 @@ where
|
||||
{
|
||||
let mut last_header_number = match block_numbers.start_bound() {
|
||||
Bound::Included(&number) => number,
|
||||
Bound::Excluded(&number) => number.saturating_sub(1),
|
||||
Bound::Excluded(&number) => number.saturating_add(1),
|
||||
Bound::Unbounded => 0,
|
||||
};
|
||||
let target = match block_numbers.end_bound() {
|
||||
Bound::Included(&number) => Some(number),
|
||||
Bound::Excluded(&number) => Some(number.saturating_add(1)),
|
||||
Bound::Excluded(&number) => Some(number.saturating_sub(1)),
|
||||
Bound::Unbounded => None,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user