move ConnectionTo from Peer to LocalPeer
further shrinking the former's API
This commit is contained in:
1 parent
505ced5cc8
commit
0229185ffe
5 files changed
+14
-10
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user