mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-05 10:55:02 +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 {
|
||||
return nil
|
||||
}
|
||||
pool.mu.Lock()
|
||||
defer pool.mu.Unlock()
|
||||
pool.mu.RLock()
|
||||
defer pool.mu.RUnlock()
|
||||
|
||||
pending := make(map[common.Address][]*txpool.LazyTransaction, len(pool.pending))
|
||||
for addr, list := range pool.pending {
|
||||
|
|
|
|||
Loading…
Reference in a new issue