mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
core/rawdb: simplify condition in test
This commit is contained in:
parent
ba740954c2
commit
2d29bcfae1
1 changed files with 2 additions and 4 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue