state: prune states using an iterator (#5864)

This commit is contained in:
Callum Waters
2021-01-08 17:05:27 +01:00
committed by GitHub
parent c61cd3fd05
commit 03a6fb2777
11 changed files with 278 additions and 153 deletions
+2 -1
View File
@@ -1559,7 +1559,8 @@ func (cs *State) pruneBlocks(retainHeight int64) (uint64, error) {
if err != nil {
return 0, fmt.Errorf("failed to prune block store: %w", err)
}
err = cs.blockExec.Store().PruneStates(base, retainHeight)
err = cs.blockExec.Store().PruneStates(retainHeight)
if err != nil {
return 0, fmt.Errorf("failed to prune state database: %w", err)
}