Clean up temporary state flags while running (#6422)

* Clean up temporary state flags while running

* Add regression test

* Simplify
This commit is contained in:
Michael Sproul
2024-10-07 20:41:52 +11:00
committed by GitHub
parent 8cf686f5c1
commit 1bd8f31545
3 changed files with 66 additions and 3 deletions

View File

@@ -21,7 +21,6 @@ where
.try_fold(vec![], |mut ops, state_root| {
let state_root = state_root?;
ops.push(StoreOp::DeleteState(state_root, None));
ops.push(StoreOp::DeleteStateTemporaryFlag(state_root));
Result::<_, Error>::Ok(ops)
})?;
@@ -29,7 +28,7 @@ where
debug!(
self.log,
"Garbage collecting {} temporary states",
delete_ops.len() / 2
delete_ops.len()
);
self.do_atomically_with_block_and_blobs_cache(delete_ops)?;
}