mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(cli): compute clean root till done (#2525)
This commit is contained in:
@ -156,16 +156,17 @@ impl Command {
|
||||
.walk_range(..)?
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
let clean_result = merkle_stage
|
||||
.execute(
|
||||
&mut tx,
|
||||
ExecInput {
|
||||
previous_stage: Some((STORAGE_HASHING, block)),
|
||||
stage_progress: None,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
assert!(clean_result.is_ok(), "Clean state root calculation failed");
|
||||
let clean_input = ExecInput {
|
||||
previous_stage: Some((STORAGE_HASHING, block)),
|
||||
stage_progress: None,
|
||||
};
|
||||
loop {
|
||||
let clean_result = merkle_stage.execute(&mut tx, clean_input).await;
|
||||
assert!(clean_result.is_ok(), "Clean state root calculation failed");
|
||||
if clean_result.unwrap().done {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
let clean_account_trie = tx
|
||||
.cursor_read::<tables::AccountsTrie>()?
|
||||
|
||||
Reference in New Issue
Block a user