move ConnectionTo from Peer to LocalPeer

further shrinking the former's API
This commit is contained in:
Matthias Radestock committed 2015-05-11 17:19:31 +01:00
1 parent 505ced5cc8
commit 0229185ffe
5 files changed
+14 -10

No files matched your search

-7
View File
@@ -48,13 +48,6 @@ func (peer *Peer) Version() uint64 {
return peer.version
}
func (peer *Peer) ConnectionTo(name PeerName) (Connection, bool) {
peer.RLock()
defer peer.RUnlock()
conn, found := peer.connections[name]
return conn, found // yes, you really can't inline that. FFS.
}
func (peer *Peer) Connections() ConnectionSet {
connections := make(ConnectionSet)
peer.RLock()