core/rawdb: improve logs

This commit is contained in:
Felix Lange 2025-03-18 21:57:59 +01:00
parent bcd46db053
commit a20cdbc6f9

View file

@ -387,13 +387,13 @@ func PruneTransactionIndex(db ethdb.Database, pruneBlock uint64) {
count++ count++
v := iter.Value() v := iter.Value()
if len(v) > 8 { if len(v) > 8 {
log.Error("Skipping prune legacy tx index entry", "hash", fmt.Sprintf("%x", iter.Key())) log.Error("Skipping legacy tx index entry", "hash", fmt.Sprintf("%x", iter.Key()))
continue continue
} }
bn := decodeNumber(v) bn := decodeNumber(v)
if bn < pruneBlock { if bn < pruneBlock {
if err := db.Delete(iter.Key()); err != nil { if err := db.Delete(iter.Key()); err != nil {
log.Crit("Error deleting tx lookup entry", "hash", fmt.Sprintf("%x", iter.Key())) log.Crit("Error deleting tx index entry", "hash", fmt.Sprintf("%x", iter.Key()))
} }
removed++ removed++
} }