core/rawdb: log error for invalid txindex entry

This commit is contained in:
Felix Lange 2025-03-18 17:24:37 +01:00
parent 403e64ce75
commit a223ee6c27

View file

@ -373,7 +373,8 @@ func PruneTransactionIndex(db ethdb.Database, pruneBlock uint64) {
for iter.Next() { for iter.Next() {
v := iter.Value() v := iter.Value()
if len(v) > 8 { if len(v) > 8 {
continue // legacy entry log.Error("Skipping prune legacy tx index entry", "hash", fmt.Sprintf("%x", iter.Key()))
continue
} }
bn := decodeNumber(v) bn := decodeNumber(v)
if bn < pruneBlock { if bn < pruneBlock {