Peer.go | 2 +- client.go | 2 +- connection.go | 6 +++--- torrent.go | 2 +- diff --git a/Peer.go b/Peer.go index 5f63e6ed1afc932d3721011300c30447469d3f02..6a0173300c2cfb2a8b3a5de34bb077699e629a33 100644 --- a/Peer.go +++ b/Peer.go @@ -21,7 +21,7 @@ func (me *Peer) FromPex(na krpc.NodeAddr, fs peer_protocol.PexPeerFlags) { me.IP = append([]byte(nil), na.IP...) me.Port = na.Port - me.Source = peerSourcePEX + me.Source = peerSourcePex // If they prefer encryption, they must support it. if fs.Get(peer_protocol.PexPrefersEncryption) { me.SupportsEncryption = true diff --git a/client.go b/client.go index f5b4adaea83d65b93d102b636424a93909d2f36e..d10750e3a32ebfd47ee536a0807b0b44813e7680 100644 --- a/client.go +++ b/client.go @@ -1254,7 +1254,7 @@ } t.addPeers([]Peer{{ IP: ip, Port: port, - Source: peerSourceDHTAnnouncePeer, + Source: peerSourceDhtAnnouncePeer, }}) } diff --git a/connection.go b/connection.go index cb24082625cf9e2f7370f01b2b28bf39581ba8ba..8e415a5039eff158a1168a93f484f16fd55cf985 100644 --- a/connection.go +++ b/connection.go @@ -31,9 +31,9 @@ const ( peerSourceTracker = "Tr" peerSourceIncoming = "I" - peerSourceDHTGetPeers = "Hg" // Peers we found by searching a DHT. - peerSourceDHTAnnouncePeer = "Ha" // Peers that were announced to us by a DHT. - peerSourcePEX = "X" + peerSourceDhtGetPeers = "Hg" // Peers we found by searching a DHT. + peerSourceDhtAnnouncePeer = "Ha" // Peers that were announced to us by a DHT. + peerSourcePex = "X" ) // Maintains the state of a connection with a peer. diff --git a/torrent.go b/torrent.go index 838011c475b897a844ac5e2193d711f68d47eeaf..917367e86eaa0fa8cb54030442cb5a6449fa2d7b 100644 --- a/torrent.go +++ b/torrent.go @@ -1341,7 +1341,7 @@ } t.addPeer(Peer{ IP: cp.IP[:], Port: cp.Port, - Source: peerSourceDHTGetPeers, + Source: peerSourceDhtGetPeers, }) } cl.unlock()