rm special iterator case

This commit is contained in:
Sina Mahmoodi 2026-03-24 21:08:18 +00:00
parent 48b1127c66
commit bfeb828460

View file

@ -422,12 +422,7 @@ func PruneTransactionIndex(db ethdb.Database, pruneBlock uint64) {
go func() {
defer wg.Done()
var it ethdb.Iterator
if rangeStart == 0 {
it = NewKeyLengthIterator(db.NewIterator(txLookupPrefix, nil), common.HashLength+len(txLookupPrefix))
} else {
it = NewKeyLengthIterator(db.NewIterator(txLookupPrefix, []byte{rangeStart}), common.HashLength+len(txLookupPrefix))
}
it := NewKeyLengthIterator(db.NewIterator(txLookupPrefix, []byte{rangeStart}), common.HashLength+len(txLookupPrefix))
defer it.Release()
batch := db.NewBatch()