fix go test error

Signed-off-by: Leo Chen <leo@harmony.one>
pull/467/head
Leo Chen 6 years ago
parent ba4d27db6f
commit b53409f24d
  1. 6
      node/node.go

@ -319,6 +319,7 @@ func New(host p2p.Host, consensus *bft.Consensus, db ethdb.Database) *Node {
if consensus != nil && consensus.IsLeader { if consensus != nil && consensus.IsLeader {
node.State = NodeLeader node.State = NodeLeader
go node.ReceiveClientGroupMessage()
} else { } else {
node.State = NodeInit node.State = NodeInit
} }
@ -333,11 +334,6 @@ func New(host p2p.Host, consensus *bft.Consensus, db ethdb.Database) *Node {
// start the goroutine to receive group message // start the goroutine to receive group message
go node.ReceiveGroupMessage() go node.ReceiveGroupMessage()
// only start the goroutine for leader
if consensus.IsLeader {
go node.ReceiveClientGroupMessage()
}
node.duplicatedPing = make(map[string]bool) node.duplicatedPing = make(map[string]bool)
if utils.UseLibP2P { if utils.UseLibP2P {

Loading…
Cancel
Save