plugeth/p2p
Felix Lange b4374436f3 p2p/discover: fix race involving the seed node iterator
nodeDB.querySeeds was not safe for concurrent use but could be called
concurrenty on multiple goroutines in the following case:

- the table was empty
- a timed refresh started
- a lookup was started and initiated refresh

These conditions are unlikely to coincide during normal use, but are
much more likely to occur all at once when the user's machine just woke
from sleep. The root cause of the issue is that querySeeds reused the
same leveldb iterator until it was exhausted.

This commit moves the refresh scheduling logic into its own goroutine
(so only one refresh is ever active) and changes querySeeds to not use
a persistent iterator. The seed node selection is now more random and
ignores nodes that have not been contacted in the last 5 days.
2015-09-30 16:23:03 +02:00
..
discover p2p/discover: fix race involving the seed node iterator 2015-09-30 16:23:03 +02:00
nat p2p/nat: disable UPnP test on windows 2015-08-06 17:18:59 +02:00
dial_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
dial.go Revert "fdtrack: temporary hack for tracking file descriptor usage" 2015-08-19 21:46:01 +02:00
message_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
message.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
metrics.go eth, metrics, p2p: prepare metrics and net packets to eth/62 2015-08-21 10:30:57 +03:00
peer_error.go p2p: fix value of DiscSubprotocolError 2015-08-12 14:15:54 +02:00
peer_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
peer.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
protocol.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
rlpx_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
rlpx.go Merge pull request #1470 from ebuchman/encHandshake 2015-08-13 11:59:27 +02:00
server_test.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
server.go Merge pull request #1694 from obscuren/hide-fdtrack 2015-08-19 13:50:54 -07:00