mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 13:36:37 +00:00
core/txpool: change lock in Pending method of legacy pool to read lock
This commit is contained in:
parent
367b5fbe42
commit
1e10b985cb
1 changed files with 2 additions and 2 deletions
|
|
@ -492,8 +492,8 @@ func (pool *LegacyPool) Pending(filter txpool.PendingFilter) map[common.Address]
|
||||||
if filter.BlobTxs {
|
if filter.BlobTxs {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
pool.mu.Lock()
|
pool.mu.RLock()
|
||||||
defer pool.mu.Unlock()
|
defer pool.mu.RUnlock()
|
||||||
|
|
||||||
pending := make(map[common.Address][]*txpool.LazyTransaction, len(pool.pending))
|
pending := make(map[common.Address][]*txpool.LazyTransaction, len(pool.pending))
|
||||||
for addr, list := range pool.pending {
|
for addr, list := range pool.pending {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue