diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-08-30 17:21:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 17:21:58 +0800 |
commit | 96554a3bc14030e5d0dfc9dc1ee6bcdd9a133fa8 (patch) | |
tree | 418e2c43acf4f9c13289eaccf66f94ef46c9356b /simulation/tcp-network.go | |
parent | a4e0da981a3dfc8817d39be65cb5b24938b0761a (diff) | |
download | dexon-consensus-96554a3bc14030e5d0dfc9dc1ee6bcdd9a133fa8.tar.gz dexon-consensus-96554a3bc14030e5d0dfc9dc1ee6bcdd9a133fa8.tar.zst dexon-consensus-96554a3bc14030e5d0dfc9dc1ee6bcdd9a133fa8.zip |
core: Add PreparePayloads to Application and Remove blockConverter interface. (#84)
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 f30284b..31c8d95 100644 --- a/simulation/tcp-network.go +++ b/simulation/tcp-network.go @@ -176,7 +176,7 @@ func (n *TCPNetwork) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Join allow a client to join the network. It reutnrs a interface{} channel for // the client to recieve information. -func (n *TCPNetwork) Join(endpoint Endpoint) chan interface{} { +func (n *TCPNetwork) Join(endpoint Endpoint) { n.endpointMutex.Lock() defer n.endpointMutex.Unlock() @@ -235,6 +235,10 @@ func (n *TCPNetwork) Join(endpoint Endpoint) chan interface{} { for key, val := range peerList { n.endpoints[key] = val } +} + +// ReceiveChan return the receive channel. +func (n *TCPNetwork) ReceiveChan() <-chan interface{} { return n.recieveChan } |