From 36528f1b388769435b65ad483731ca4ca2ccc453 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 2 Jun 2023 14:57:14 +0200 Subject: [PATCH] fix: off by one unwind range (#2960) --- bin/reth/src/stage/unwind.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/reth/src/stage/unwind.rs b/bin/reth/src/stage/unwind.rs index 412d0eda45..d709ddaeba 100644 --- a/bin/reth/src/stage/unwind.rs +++ b/bin/reth/src/stage/unwind.rs @@ -109,7 +109,7 @@ impl Subcommands { .ok_or_else(|| eyre::eyre!("Block hash not found in database: {hash:?}"))?, BlockHashOrNumber::Number(num) => *num, }, - Subcommands::NumBlocks { amount } => last.0.saturating_sub(*amount), + Subcommands::NumBlocks { amount } => last.0.saturating_sub(*amount) + 1, }; Ok(target..=last.0) }