refactor(ish): move a bunch of methods from Peer to LocalPeer

in order to reduce the former's API surface
This commit is contained in:
Matthias Radestock committed 2015-05-11 17:19:15 +01:00
1 parent 52a89a318a
commit 3e6eef5ebd
6 files changed
+38 -36

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ import (
func (peers *Peers) AddTestConnection(p *Peer) {
toPeer := NewPeer(p.Name, "", p.UID, 0)
peers.FetchWithDefault(toPeer) // Has side-effect of incrementing refcount
conn := newMockConnection(peers.ourself, toPeer)
conn := newMockConnection(peers.ourself.Peer, toPeer)
peers.ourself.addConnection(conn)
peers.ourself.connectionEstablished(conn)
}