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