|
|
@ -170,6 +170,7 @@ func main() { |
|
|
|
// Start the client server to listen to leader's message
|
|
|
|
// Start the client server to listen to leader's message
|
|
|
|
go clientNode.StartServer() |
|
|
|
go clientNode.StartServer() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if *peerDiscovery { |
|
|
|
for _, leader := range shardIDLeaderMap { |
|
|
|
for _, leader := range shardIDLeaderMap { |
|
|
|
log.Debug("Client Join Shard", "leader", leader) |
|
|
|
log.Debug("Client Join Shard", "leader", leader) |
|
|
|
go clientNode.JoinShard(leader) |
|
|
|
go clientNode.JoinShard(leader) |
|
|
@ -178,6 +179,7 @@ func main() { |
|
|
|
clientNode.StopPing <- struct{}{} |
|
|
|
clientNode.StopPing <- struct{}{} |
|
|
|
clientNode.State = node.NodeJoinedShard |
|
|
|
clientNode.State = node.NodeJoinedShard |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Transaction generation process
|
|
|
|
// Transaction generation process
|
|
|
|
time.Sleep(10 * time.Second) // wait for nodes to be ready
|
|
|
|
time.Sleep(10 * time.Second) // wait for nodes to be ready
|
|
|
|