Skip to content

Commit eacef71

Browse files
committed
Remove redundant lock acqusition when calling Remove() on expirable.LRU
1 parent b88528a commit eacef71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

services/requester/batch_tx_pool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ func (t *BatchTxPool) Add(
194194
}
195195

196196
if err != nil {
197-
t.txMux.Lock()
198197
// If there was an error during tx submission, remove the entry
199198
// from the cache, to not block future requests with same nonce.
199+
// Note: No need to acquire the `t.txMux` lock, `Remove` already
200+
// has an internal lock.
200201
t.eoaActivityCache.Remove(from)
201-
t.txMux.Unlock()
202202

203203
t.logger.Error().Err(err).Msgf(
204204
"failed to submit single Flow transaction for EOA: %s",

0 commit comments

Comments
 (0)