mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
10e842853b
[simplelru](https://github.com/hashicorp/golang-lru/tree/master/simplelru) is not thread safe. During the `Get` operation, the recentness of the accessed item is updated, so it is not a pure read-operation. Therefore, the mutex we need to protect the LRUs in txpool is a full mutex, not `RLock`. See https://github.com/ledgerwatch/erigon/issues/4679#issuecomment-1312064790 and https://github.com/ethereum/go-ethereum/pull/26164. Also, RWMutex has a performance overhead compared with the vanilla one (see, for example, https://github.com/golang/go/issues/38813). Kudos to Martin Swende for pointing to the issue. |
||
---|---|---|
.. | ||
testdata | ||
txpooluitl | ||
fetch_test.go | ||
fetch.go | ||
mocks_test.go | ||
pool_fuzz_test.go | ||
pool_test.go | ||
pool.go | ||
send.go | ||
test_util.go | ||
txpool_grpc_server.go |