|
|
|
@ -319,6 +319,7 @@ func New(host p2p.Host, consensus *bft.Consensus, db ethdb.Database) *Node { |
|
|
|
|
|
|
|
|
|
if consensus != nil && consensus.IsLeader { |
|
|
|
|
node.State = NodeLeader |
|
|
|
|
go node.ReceiveClientGroupMessage() |
|
|
|
|
} else { |
|
|
|
|
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
|
|
|
|
|
go node.ReceiveGroupMessage() |
|
|
|
|
|
|
|
|
|
// only start the goroutine for leader
|
|
|
|
|
if consensus.IsLeader { |
|
|
|
|
go node.ReceiveClientGroupMessage() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.duplicatedPing = make(map[string]bool) |
|
|
|
|
|
|
|
|
|
if utils.UseLibP2P { |
|
|
|
|