From 26a8c3c571fae86b3e1e18a6787a6fde819ee565 Mon Sep 17 00:00:00 2001 From: ledgerwatch Date: Mon, 21 Mar 2022 07:26:21 +0000 Subject: [PATCH] [erigon2] Fix rebuild state (#386) Co-authored-by: Alex Sharp --- aggregator/aggregator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 64900a73c..2df77dd37 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -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