|
|
@ -165,14 +165,14 @@ func main() { |
|
|
|
log.Debug("Client Join Shard", "leader", leader) |
|
|
|
log.Debug("Client Join Shard", "leader", leader) |
|
|
|
clientNode.GetHost().AddPeer(&leader) |
|
|
|
clientNode.GetHost().AddPeer(&leader) |
|
|
|
go clientNode.JoinShard(leader) |
|
|
|
go clientNode.JoinShard(leader) |
|
|
|
// wait for 3 seconds for client to send ping message to leader
|
|
|
|
} |
|
|
|
time.Sleep(3 * time.Second) |
|
|
|
// wait for 1 seconds for client to send ping message to leader
|
|
|
|
|
|
|
|
time.Sleep(time.Second) |
|
|
|
clientNode.StopPing <- struct{}{} |
|
|
|
clientNode.StopPing <- struct{}{} |
|
|
|
clientNode.State = node.NodeJoinedShard |
|
|
|
clientNode.State = node.NodeJoinedShard |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Transaction generation process
|
|
|
|
// Transaction generation process
|
|
|
|
time.Sleep(5 * time.Second) // wait for nodes to be ready
|
|
|
|
time.Sleep(2 * time.Second) // wait for nodes to be ready
|
|
|
|
start := time.Now() |
|
|
|
start := time.Now() |
|
|
|
totalTime := float64(*duration) |
|
|
|
totalTime := float64(*duration) |
|
|
|
|
|
|
|
|
|
|
|