aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/faucet/faucet.go
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2018-01-22 20:38:34 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-01-22 20:38:34 +0800
commit92580d69d3156e5d2f0788eb5d48664cc3fb0ef3 (patch)
treefc9a52735b2857802a18bcdd0964d5e861024ddd /cmd/faucet/faucet.go
parent02aeb3d76652a4c0451e5c3734e6881aefe46249 (diff)
downloaddexon-92580d69d3156e5d2f0788eb5d48664cc3fb0ef3.tar.gz
dexon-92580d69d3156e5d2f0788eb5d48664cc3fb0ef3.tar.zst
dexon-92580d69d3156e5d2f0788eb5d48664cc3fb0ef3.zip
p2p, p2p/discover, p2p/discv5: implement UDP port sharing (#15200)
This commit affects p2p/discv5 "topic discovery" by running it on the same UDP port where the old discovery works. This is realized by giving an "unhandled" packet channel to the old v4 discovery packet handler where all invalid packets are sent. These packets are then processed by v5. v5 packets are always invalid when interpreted by v4 and vice versa. This is ensured by adding one to the first byte of the packet hash in v5 packets. DiscoveryV5Bootnodes is also changed to point to new bootnodes that are implementing the changed packet format with modified hash. Existing and new v5 bootnodes are both running on different ports ATM.
Diffstat (limited to 'cmd/faucet/faucet.go')
-rw-r--r--cmd/faucet/faucet.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go
index e92924fc9..99527f9d1 100644
--- a/cmd/faucet/faucet.go
+++ b/cmd/faucet/faucet.go
@@ -223,7 +223,6 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u
NoDiscovery: true,
DiscoveryV5: true,
ListenAddr: fmt.Sprintf(":%d", port),
- DiscoveryV5Addr: fmt.Sprintf(":%d", port+1),
MaxPeers: 25,
BootstrapNodesV5: enodes,
},