mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/txpool/legacypool: fix validTxMeter to count transactions (not accounts)
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
1e4b39ed12
commit
a9a6192e33
1 changed files with 1 additions and 1 deletions
|
|
@ -965,6 +965,7 @@ func (pool *LegacyPool) Add(txs []*types.Transaction, sync bool) []error {
|
||||||
pool.mu.Lock()
|
pool.mu.Lock()
|
||||||
newErrs, dirtyAddrs := pool.addTxsLocked(news)
|
newErrs, dirtyAddrs := pool.addTxsLocked(news)
|
||||||
pool.mu.Unlock()
|
pool.mu.Unlock()
|
||||||
|
validTxMeter.Mark(int64(len(news)))
|
||||||
|
|
||||||
var nilSlot = 0
|
var nilSlot = 0
|
||||||
for _, err := range newErrs {
|
for _, err := range newErrs {
|
||||||
|
|
@ -994,7 +995,6 @@ func (pool *LegacyPool) addTxsLocked(txs []*types.Transaction) ([]error, *accoun
|
||||||
dirty.addTx(tx)
|
dirty.addTx(tx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validTxMeter.Mark(int64(len(dirty.accounts)))
|
|
||||||
return errs, dirty
|
return errs, dirty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue