From 0d8efd8f69ff75a56782a5f949ab6958cc87b348 Mon Sep 17 00:00:00 2001 From: bendanzhentan <455462586@qq.com> Date: Tue, 24 Dec 2024 02:20:17 +0800 Subject: [PATCH] chore: expose execution error of debug_cmd/merkle.rs (#13515) --- bin/reth/src/commands/debug_cmd/merkle.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/reth/src/commands/debug_cmd/merkle.rs b/bin/reth/src/commands/debug_cmd/merkle.rs index 26e7017a8b35..f273d7ddb23a 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; } }