diff --git a/bin/reth/src/commands/debug_cmd/merkle.rs b/bin/reth/src/commands/debug_cmd/merkle.rs index 26e7017a8b..f273d7ddb2 100644 --- a/bin/reth/src/commands/debug_cmd/merkle.rs +++ b/bin/reth/src/commands/debug_cmd/merkle.rs @@ -215,10 +215,11 @@ impl> Command { let clean_input = ExecInput { target: Some(sealed_block.number), checkpoint: None }; loop { - let clean_result = merkle_stage.execute(&provider_rw, clean_input); - assert!(clean_result.is_ok(), "Clean state root calculation failed"); - if clean_result.unwrap().done { - break + let clean_result = merkle_stage + .execute(&provider_rw, clean_input) + .map_err(|e| eyre::eyre!("Clean state root calculation failed: {}", e))?; + if clean_result.done { + break; } }