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

+1 -1
View File
@@ -52,7 +52,7 @@ func TestPeersEncoding(t *testing.T) {
case 0:
from, to := rand.Intn(numNodes), rand.Intn(numNodes)
if from != to {
if _, found := peer[from].ConnectionTo(peer[to].Name); !found {
if _, found := peer[from].connections[peer[to].Name]; !found {
ps[from].AddTestConnection(peer[to])
conns = append(conns, struct{ from, to int }{from, to})
checkApplyUpdate(t, ps[from])