diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-01-06 20:13:16 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-01-06 20:13:16 +0800 |
commit | 3b8725e0f5622733dcb6c3ec142a83ddbb94bd6c (patch) | |
tree | cf9e8919920cfc3a3ea776bfd1d04442d05efdaf /p2p/peer.go | |
parent | 117f66e82375b752cc6a9ff22aa0d398ac337bb4 (diff) | |
parent | 3caa4ad1baba3019c06733e1a80d78d9a57137bb (diff) | |
download | dexon-3b8725e0f5622733dcb6c3ec142a83ddbb94bd6c.tar.gz dexon-3b8725e0f5622733dcb6c3ec142a83ddbb94bd6c.tar.zst dexon-3b8725e0f5622733dcb6c3ec142a83ddbb94bd6c.zip |
Merge pull request #239 from fjl/grab-bag
Grab bag of fixes
Diffstat (limited to 'p2p/peer.go')
-rw-r--r-- | p2p/peer.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/p2p/peer.go b/p2p/peer.go index 0d7eec9f4..2380a3285 100644 --- a/p2p/peer.go +++ b/p2p/peer.go @@ -460,25 +460,3 @@ func (r *eofSignal) Read(buf []byte) (int, error) { } return n, err } - -func (peer *Peer) PeerList() []interface{} { - peers := peer.otherPeers() - ds := make([]interface{}, 0, len(peers)) - for _, p := range peers { - p.infolock.Lock() - addr := p.listenAddr - p.infolock.Unlock() - // filter out this peer and peers that are not listening or - // have not completed the handshake. - // TODO: track previously sent peers and exclude them as well. - if p == peer || addr == nil { - continue - } - ds = append(ds, addr) - } - ourAddr := peer.ourListenAddr - if ourAddr != nil && !ourAddr.IP.IsLoopback() && !ourAddr.IP.IsUnspecified() { - ds = append(ds, ourAddr) - } - return ds -} |