Remove redundant variable
This commit is contained in:
1 parent
ac8d7a5c55
commit
b10c2e554c
1 file changed
-2
@@ -132,7 +132,6 @@ func (peers *Peers) EncodePeers(names PeerNameSet) []byte {
|
||||
enc := gob.NewEncoder(buf)
|
||||
peers.RLock()
|
||||
defer peers.RUnlock()
|
||||
peerList := make([]*Peer, 0, len(names))
|
||||
for name := range names {
|
||||
if peer, found := peers.table[name]; found {
|
||||
if peer == peers.ourself.Peer {
|
||||
@@ -140,7 +139,6 @@ func (peers *Peers) EncodePeers(names PeerNameSet) []byte {
|
||||
} else {
|
||||
peer.Encode(enc)
|
||||
}
|
||||
peerList = append(peerList, peer)
|
||||
}
|
||||
}
|
||||
return buf.Bytes()
|
||||
|
||||
Reference in new issue
Block a user