core/txpool/legacypool: fix validTxMeter to count transactions (not accounts)

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-10-07 13:46:27 +02:00
parent 1e4b39ed12
commit a9a6192e33
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -965,6 +965,7 @@ func (pool *LegacyPool) Add(txs []*types.Transaction, sync bool) []error {
pool.mu.Lock()
newErrs, dirtyAddrs := pool.addTxsLocked(news)
pool.mu.Unlock()
validTxMeter.Mark(int64(len(news)))
var nilSlot = 0
for _, err := range newErrs {
@ -994,7 +995,6 @@ func (pool *LegacyPool) addTxsLocked(txs []*types.Transaction) ([]error, *accoun
dirty.addTx(tx)
}
}
validTxMeter.Mark(int64(len(dirty.accounts)))
return errs, dirty
}