[erigon2] Fix rebuild state (#386)

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
ledgerwatch 2022-03-21 07:26:21 +00:00 committed by GitHub
parent 8c4a3df7f1
commit 26a8c3c571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1093,7 +1093,7 @@ func NewAggregator(diffDir string, unwindLimit uint64, aggregationStep uint64, c
func (a *Aggregator) rebuildRecentState() error {
t := time.Now()
var err error
a.changesBtree.Descend(func(i btree.Item) bool {
a.changesBtree.Ascend(func(i btree.Item) bool {
item := i.(*ChangesItem)
for fType := FirstType; fType < NumberOfStateTypes; fType++ {
var changes Changes