go-ethereum/eth/downloader
Felix Lange 900da3d800 eth/downloader: don't hang for spurious deliveries
Unexpected deliveries could block indefinitely if they arrived at the
right time. The fix is to ensure that the cancellation channel is
always closed when the sync ends, unblocking any deliveries. Also remove
the atomic check for whether a sync is currently running because it
doesn't help and can be misleading.

Cancelling always seems to break the tests though. The downloader
spawned d.process whenever new data arrived, making it somewhat hard to
track when block processing was actually done. Fix this by running
d.process in a dedicated goroutine that is tied to the lifecycle of the
sync. d.process gets notified of new work by the queue instead of being
invoked all the time. This removes a ton of weird workaround code,
including a hairy use of atomic CAS.
2015-11-19 14:18:34 +01:00
..
downloader_test.go eth/downloader: don't hang for spurious deliveries 2015-11-19 14:18:34 +01:00
downloader.go eth/downloader: don't hang for spurious deliveries 2015-11-19 14:18:34 +01:00
events.go all: fix license headers one more time 2015-07-23 18:35:11 +02:00
metrics.go core, eth, trie: direct state trie synchronization 2015-10-19 10:03:09 +03:00
modes.go core, eth, trie: fix data races and merge/review issues 2015-10-21 16:49:55 +03:00
peer.go eth/downloader: fix dysfunctional ignore list hidden by generic set 2015-11-04 13:11:52 +02:00
queue.go eth/downloader: don't hang for spurious deliveries 2015-11-19 14:18:34 +01:00
types.go core, eth: roll back uncertain headers in failed fast syncs 2015-10-19 10:03:10 +03:00