Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
eastorski committed Dec 12, 2024
1 parent 9c2d958 commit 63a0624
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions erigon-lib/state/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1979,12 +1979,22 @@ func lastIdInDB(db kv.RoDB, domain *Domain) (lstInDb uint64) {
}

func lastIdInDBNoHistory(db kv.RoDB, domain *Domain) (lstInDb uint64) {
fmt.Println("LAL BuildFilesInBackground lastIdInDBNoHistory start tx")

if err := db.View(context.Background(), func(tx kv.Tx) error {
fmt.Println("LAL BuildFilesInBackground lastIdInDBNoHistory in tx")

//lstInDb = domain.maxStepInDB(tx)
lstInDb = domain.maxStepInDBNoHistory(tx)

fmt.Println("LAL BuildFilesInBackground lastIdInDBNoHistory tx")

return nil
}); err != nil {
log.Warn("[snapshots] lastIdInDB", "err", err)
}

fmt.Println("LAL BuildFilesInBackground lastIdInDBNoHistory commited tx")

return lstInDb
}

0 comments on commit 63a0624

Please sign in to comment.