cmd/geth: Fix type mismatches in dbcmd_test.go between uint64 and int

This commit is contained in:
sivaratrisrinivas 2025-03-12 04:12:56 -05:00
parent 6942807df3
commit 39765c1d92

View file

@ -180,15 +180,15 @@ func TestTruncateFreezerBatching(t *testing.T) {
// or the number of items in the original freezer, whichever is smaller
expectedCount := mergeBlock
if ancients < mergeBlock {
expectedCount = ancients
expectedCount = int(ancients)
}
if headersFreezerAncients != expectedCount {
if int(headersFreezerAncients) != expectedCount {
t.Fatalf("Expected %d items in headers freezer, got %d", expectedCount, headersFreezerAncients)
}
// Verify that the headers in the temporary freezer match the originals
for i := uint64(0); i < expectedCount; i++ {
for i := uint64(0); i < uint64(expectedCount); i++ {
// Read from original freezer
originalHeader, err := ancientDb.Ancient(rawdb.ChainFreezerHeaderTable, i)
if err != nil {