chore: expose execution error of debug_cmd/merkle.rs (#13515)

This commit is contained in:
bendanzhentan
2024-12-24 02:20:17 +08:00
committed by GitHub
parent 50dfd301d3
commit 0d8efd8f69

View File

@@ -215,10 +215,11 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
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;
}
}