|
|
@ -8,6 +8,7 @@ import ( |
|
|
|
"math/rand" |
|
|
|
"math/rand" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"path" |
|
|
|
"path" |
|
|
|
|
|
|
|
"runtime" |
|
|
|
"sync" |
|
|
|
"sync" |
|
|
|
"time" |
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
@ -332,7 +333,7 @@ func main() { |
|
|
|
wg.Add(len(shardIdLeaderMap)) |
|
|
|
wg.Add(len(shardIdLeaderMap)) |
|
|
|
|
|
|
|
|
|
|
|
utxoPoolMutex.Lock() |
|
|
|
utxoPoolMutex.Lock() |
|
|
|
log.Warn("STARTING TX GEN") |
|
|
|
log.Warn("STARTING TX GEN", "gomaxprocs", runtime.GOMAXPROCS(0)) |
|
|
|
for shardId, _ := range shardIdLeaderMap { // Generate simulated transactions
|
|
|
|
for shardId, _ := range shardIdLeaderMap { // Generate simulated transactions
|
|
|
|
go func() { |
|
|
|
go func() { |
|
|
|
txs, crossTxs := generateSimulatedTransactions(subsetCounter, *numSubset, int(shardId), nodes) |
|
|
|
txs, crossTxs := generateSimulatedTransactions(subsetCounter, *numSubset, int(shardId), nodes) |
|
|
@ -370,7 +371,7 @@ func main() { |
|
|
|
lock.Unlock() |
|
|
|
lock.Unlock() |
|
|
|
|
|
|
|
|
|
|
|
subsetCounter++ |
|
|
|
subsetCounter++ |
|
|
|
time.Sleep(5000 * time.Millisecond) |
|
|
|
//time.Sleep(5000 * time.Millisecond)
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Send a stop message to stop the nodes at the end
|
|
|
|
// Send a stop message to stop the nodes at the end
|
|
|
|