core/rawdb: simplify condition in test

This commit is contained in:
Felix Lange 2025-03-18 18:05:43 +01:00
parent ba740954c2
commit 2d29bcfae1

View file

@ -242,11 +242,9 @@ func TestPruneTransactionIndex(t *testing.T) {
for _, block := range blocks { for _, block := range blocks {
for _, tx := range block.Transactions() { for _, tx := range block.Transactions() {
num := ReadTxLookupEntry(chainDB, tx.Hash()) num := ReadTxLookupEntry(chainDB, tx.Hash())
if block.NumberU64() < pruneBlock { if block.NumberU64() < pruneBlock && num != nil {
if num != nil {
t.Fatalf("TxLookup entry not removed: %x -> %v", tx.Hash(), num) t.Fatalf("TxLookup entry not removed: %x -> %v", tx.Hash(), num)
} }
} }
} }
}
} }