plugeth/cmd/devp2p
Felix Lange 191364c350 p2p/dnsdisc: add enode.Iterator API (#20437)
* p2p/dnsdisc: add support for enode.Iterator

This changes the dnsdisc.Client API to support the enode.Iterator
interface.

* p2p/dnsdisc: rate-limit DNS requests

* p2p/dnsdisc: preserve linked trees across root updates

This improves the way links are handled when the link root changes.
Previously, sync would simply remove all links from the current tree and
garbage-collect all unreachable trees before syncing the new list of
links.

This behavior isn't great in certain cases: Consider a structure where
trees A, B, and C reference each other and D links to A. If D's link
root changed, the sync code would first remove trees A, B and C, only to
re-sync them later when the link to A was found again.

The fix for this problem is to track the current set of links in each
clientTree and removing old links only AFTER all links are synced.

* p2p/dnsdisc: deflake iterator test

* cmd/devp2p: adapt dnsClient to new p2p/dnsdisc API

* p2p/dnsdisc: tiny comment fix
2019-12-12 11:15:36 +02:00
..
crawl.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
discv4cmd.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
dns_cloudflare.go p2p/dnsdisc: add implementation of EIP-1459 (#20094) 2019-09-25 11:38:13 +02:00
dnscmd.go p2p/dnsdisc: add enode.Iterator API (#20437) 2019-12-12 11:15:36 +02:00
enrcmd.go cmd/devp2p: add devp2p debug tool (#19657) 2019-06-07 15:29:16 +02:00
main.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
nodeset.go cmd/devp2p, p2p: dial using node iterator, discovery crawler (#20132) 2019-10-29 17:08:57 +02:00
nodesetcmd.go cmd/devp2p, core/forkid: make forkid.Filter API uniform 2019-10-31 10:38:14 +02:00