only attack validators

pull/75/head
Minh Doan 6 years ago
parent cd9a17eaa4
commit 5ddca253ff
  1. 8
      benchmark.go

@ -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)

Loading…
Cancel
Save