diff options
Diffstat (limited to 'simulation/tcp-network.go')
-rw-r--r-- | simulation/tcp-network.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/simulation/tcp-network.go b/simulation/tcp-network.go index 7640480..02475e1 100644 --- a/simulation/tcp-network.go +++ b/simulation/tcp-network.go @@ -50,9 +50,13 @@ func NewTCPNetwork(local bool, peerServer string) *TCPNetwork { if !local { port = peerPort } + pServer := peerServer + if local { + pServer = "localhost" + } return &TCPNetwork{ local: local, - peerServer: peerServer, + peerServer: pServer, port: port, endpoints: make(map[types.ValidatorID]string), recieveChan: make(chan interface{}, msgBufferSize), |