plugeth/p2p/discover/v5wire
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
..
testdata p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
crypto_test.go p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
crypto.go p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
encoding_test.go p2p/discover/v5wire: reject packets smaller than 63 bytes (#25740) 2022-09-12 15:02:03 +02:00
encoding.go p2p/discover: fix handling of distance 256 in lookupDistances (#26087) 2022-11-02 14:50:07 +01:00
msg.go all: fix docstrings 2022-10-04 09:18:02 +02:00
session.go common/lru: add generic LRU implementation (#26162) 2022-11-14 15:41:56 +01:00