core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480)

This commit is contained in:
Giuseppe Bertone
2020-09-15 10:37:01 +02:00
committed by GitHub
parent 4764b2f0be
commit 0185ee0993
5 changed files with 31 additions and 29 deletions

View File

@ -185,7 +185,7 @@ func (pool *TxPool) checkMinedTxs(ctx context.Context, hash common.Hash, number
if _, err := GetBlockReceipts(ctx, pool.odr, hash, number); err != nil { // ODR caches, ignore results
return err
}
rawdb.WriteTxLookupEntries(pool.chainDb, block)
rawdb.WriteTxLookupEntriesByBlock(pool.chainDb, block)
// Update the transaction pool's state
for _, tx := range list {