mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix(commands): prevents potential arithmetic underflow in debug commands (#8883)
This commit is contained in:
@@ -167,7 +167,9 @@ impl Command {
|
||||
OriginalValuesKnown::Yes,
|
||||
)?;
|
||||
|
||||
let checkpoint = Some(StageCheckpoint::new(block_number - 1));
|
||||
let checkpoint = Some(StageCheckpoint::new(
|
||||
block_number.checked_sub(1).ok_or(eyre::eyre!("GenesisBlockHasNoParent"))?,
|
||||
));
|
||||
|
||||
let mut account_hashing_done = false;
|
||||
while !account_hashing_done {
|
||||
|
||||
Reference in New Issue
Block a user