From 6da3290a3ea1cc16f9ca803588b254e0527af849 Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Fri, 9 Jun 2023 15:46:47 +0400 Subject: [PATCH] fix(bin): unwind CLI `to-block` behavior (#3077) --- bin/reth/src/stage/unwind.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reth/src/stage/unwind.rs b/bin/reth/src/stage/unwind.rs index c26c317481..42904bac01 100644 --- a/bin/reth/src/stage/unwind.rs +++ b/bin/reth/src/stage/unwind.rs @@ -109,8 +109,8 @@ 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) + 1, - }; + Subcommands::NumBlocks { amount } => last.0.saturating_sub(*amount), + } + 1; Ok(target..=last.0) } }