|
|
@ -94,9 +94,6 @@ func main() { |
|
|
|
// Set up randomization seed.
|
|
|
|
// Set up randomization seed.
|
|
|
|
rand.Seed(int64(time.Now().Nanosecond())) |
|
|
|
rand.Seed(int64(time.Now().Nanosecond())) |
|
|
|
|
|
|
|
|
|
|
|
// Attack determination.
|
|
|
|
|
|
|
|
attack.GetInstance().SetAttackEnabled(attackDetermination(*attackedMode)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
distributionConfig := utils.NewDistributionConfig() |
|
|
|
distributionConfig := utils.NewDistributionConfig() |
|
|
|
distributionConfig.ReadConfigFile(*configFile) |
|
|
|
distributionConfig.ReadConfigFile(*configFile) |
|
|
|
shardID := distributionConfig.GetShardID(*ip, *port) |
|
|
|
shardID := distributionConfig.GetShardID(*ip, *port) |
|
|
@ -111,6 +108,11 @@ func main() { |
|
|
|
role = "validator" |
|
|
|
role = "validator" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if role == "validator" { |
|
|
|
|
|
|
|
// Attack determination.
|
|
|
|
|
|
|
|
attack.GetInstance().SetAttackEnabled(attackDetermination(*attackedMode)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Init logging.
|
|
|
|
// Init logging.
|
|
|
|
loggingInit(*logFolder, role, *ip, *port, *onlyLogTps) |
|
|
|
loggingInit(*logFolder, role, *ip, *port, *onlyLogTps) |
|
|
|
|
|
|
|
|
|
|
|