go-ethereum/p2p/dnsdisc
Felix Lange 9afc6816d2
common/lru: add generic LRU implementation (#26162)
It seems there is no fully typed library implementation of an LRU cache.
So I wrote one. Method names are the same as github.com/hashicorp/golang-lru,
and the new type can be used as a drop-in replacement.

Two reasons to do this:

- It's much easier to understand what a cache is for when the types are right there.
- Performance: the new implementation is slightly faster and performs zero memory
   allocations in Add when the cache is at capacity. Overall, memory usage of the cache
   is much reduced because keys are values are no longer wrapped in interface.
2022-11-14 15:41:56 +01:00
..
client.go common/lru: add generic LRU implementation (#26162) 2022-11-14 15:41:56 +01:00
client_test.go p2p: add channel buffers to avoid goroutine leaks in tests (#24929) 2022-09-23 10:51:12 +02:00
doc.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
error.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
sync.go p2p/dnsdisc: fix hot-spin when all trees are empty (#22313) 2021-02-19 09:54:46 +01:00
sync_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
tree.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
tree_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00