From cc0f0e27a673fa7c0d14ab36ed0847314bdb3e2c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 8 Jul 2019 17:41:41 +0200 Subject: [PATCH] p2p: remove "cap" enr entry (#19800) This entry was an experiment, but we're moving on to the entry-per-protocol instead. --- p2p/protocol.go | 2 -- p2p/server.go | 1 - 2 files changed, 3 deletions(-) diff --git a/p2p/protocol.go b/p2p/protocol.go index 9438ab8e47..9ce4c20203 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -79,5 +79,3 @@ func (cs capsByNameAndVersion) Swap(i, j int) { cs[i], cs[j] = cs[j], cs[i] } func (cs capsByNameAndVersion) Less(i, j int) bool { return cs[i].Name < cs[j].Name || (cs[i].Name == cs[j].Name && cs[i].Version < cs[j].Version) } - -func (capsByNameAndVersion) ENRKey() string { return "cap" } diff --git a/p2p/server.go b/p2p/server.go index 916298b1b4..12b4c05c1f 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -488,7 +488,6 @@ func (srv *Server) setupLocalNode() error { srv.nodedb = db srv.localnode = enode.NewLocalNode(db, srv.PrivateKey) srv.localnode.SetFallbackIP(net.IP{127, 0, 0, 1}) - srv.localnode.Set(capsByNameAndVersion(srv.ourHandshake.Caps)) // TODO: check conflicts for _, p := range srv.Protocols { for _, e := range p.Attributes {