From f354fa849eea9e45f28fd9b7d6e2c58b59eda8db Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Wed, 17 Dec 2014 11:25:49 -0800 Subject: [PATCH] mocknet: FullMesh connects to self too. @maybebtc thoughts on this? dialing self should be **possible**, so we should in general test that we do consider that case, but not sure if this is good to expose to clients. thoughts? Btw, on why dialing self should be possible, we may create little protocols which we may have a node connect to self, say across its interfaces to test connectivity, etc... think of it like: > server localhost:1234 & > curl localhost:1234 --- net/mock/mock.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/mock/mock.go b/net/mock/mock.go index db7066dec..b892a74ed 100644 --- a/net/mock/mock.go +++ b/net/mock/mock.go @@ -53,10 +53,6 @@ func FullMeshConnected(ctx context.Context, n int) (Mocknet, error) { nets := m.Nets() for _, n1 := range nets { for _, n2 := range nets { - if n1 == n2 { - continue - } - if err := m.ConnectNets(n1, n2); err != nil { return nil, err }