From d113aa8c1dcff1bb2a2685b44d47980e2518f4ac Mon Sep 17 00:00:00 2001
From: Juan Batiz-Benet <juan@benet.ai>
Date: Sat, 11 Oct 2014 06:38:12 -0700
Subject: [PATCH] no longer store incoming addrs

---
 net/swarm/conn.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/swarm/conn.go b/net/swarm/conn.go
index cbe7cd79..35fbcaa4 100644
--- a/net/swarm/conn.go
+++ b/net/swarm/conn.go
@@ -114,7 +114,10 @@ func (s *Swarm) connSetup(c *conn.Conn) error {
 	log.Debug("%s secured connection: %s", c.Local, c.Remote)
 
 	// add address of connection to Peer. Maybe it should happen in connSecure.
-	c.Remote.AddAddress(c.Conn.RemoteMultiaddr())
+	// NOT adding this address here, because the incoming address in TCP
+	// is an EPHEMERAL address, and not the address we want to keep around.
+	// addresses should be figured out through the DHT.
+	// c.Remote.AddAddress(c.Conn.RemoteMultiaddr())
 
 	if err := s.connVersionExchange(c); err != nil {
 		return fmt.Errorf("Conn version exchange error: %v", err)
-- 
GitLab