fix(cli): compute clean root till done (#2525)

This commit is contained in:
Roman Krasiuk
2023-05-02 22:26:34 +03:00
committed by GitHub
parent ecc7ae9bb1
commit ec7a10b57e

View File

@ -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>()?