Skip to content

Commit

Permalink
Revert "core/state: no need to prune block
Browse files Browse the repository at this point in the history
This reverts commit 1bbd4b8.

Signed-off-by: Delweng <[email protected]>
  • Loading branch information
jsvisa committed May 23, 2023
1 parent d9e700e commit d7dbc34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions core/state/pruner/pruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,8 @@ func (p *BlockPruner) backUpOldDb(name string, cache, handles int, namespace str

// If the items in freezer is less than the block amount that we want to reserve, it is not enough, should stop.
if itemsOfAncient < p.BlockAmountReserved {
log.Error("the number of old blocks is not enough to reserve", "ancient items", itemsOfAncient, "the amount specified", p.BlockAmountReserved)
log.Error("the number of old blocks is not enough to reserve,", "ancient items", itemsOfAncient, "the amount specified", p.BlockAmountReserved)
return errors.New("the number of old blocks is not enough to reserve")
} else if itemsOfAncient == p.BlockAmountReserved {
log.Error("the number of old blocks is the same to be reserved", "ancient items", itemsOfAncient, "the amount specified", p.BlockAmountReserved)
return errors.New("the number of old blocks is the same to be reserved")
}

var oldOffSet uint64
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata

0 comments on commit d7dbc34

Please sign in to comment.