Skip to content

Commit

Permalink
fix: unwind_to should be exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgao001 committed Sep 6, 2024
1 parent d22c6f3 commit f32ee37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/stages/stages/src/stages/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ where

// First unwind the db tables, until the unwind_to block number. use the walker to unwind
// HeaderNumbers based on the index in CanonicalHeaders
// unwind from the next block number since the unwind_to block is exclusive
provider.unwind_table_by_walker::<tables::CanonicalHeaders, tables::HeaderNumbers>(
input.unwind_to..,
(input.unwind_to + 1)..,
)?;
provider.unwind_table_by_num::<tables::CanonicalHeaders>(input.unwind_to)?;
provider.unwind_table_by_num::<tables::HeaderTerminalDifficulties>(input.unwind_to)?;
Expand Down

0 comments on commit f32ee37

Please sign in to comment.