diff --git a/core/txpool/legacypool/legacypool.go b/core/txpool/legacypool/legacypool.go index ceedc74a53..f7bb2d2908 100644 --- a/core/txpool/legacypool/legacypool.go +++ b/core/txpool/legacypool/legacypool.go @@ -456,7 +456,7 @@ func (pool *LegacyPool) stats() (int, int) { // Content retrieves the data content of the transaction pool, returning all the // pending as well as queued transactions, grouped by account and sorted by nonce. func (pool *LegacyPool) Content() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction) { - pool.mu.Lock() + pool.mu.RLock() defer pool.mu.Unlock() pending := make(map[common.Address][]*types.Transaction, len(pool.pending)) @@ -492,7 +492,7 @@ func (pool *LegacyPool) Pending(filter txpool.PendingFilter) map[common.Address] if filter.BlobTxs { return nil } - pool.mu.Lock() + pool.mu.RLock() defer pool.mu.Unlock() pending := make(map[common.Address][]*txpool.LazyTransaction, len(pool.pending))