diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-09-05 10:32:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 10:32:25 +0800 |
commit | 41641e10286dd7b1fdcced6a51157e061d545ef5 (patch) | |
tree | 69129be3df35d7abde7b94ef5ceec828787b3498 /simulation/simulation.go | |
parent | 04a63a22a24abaaa91b1d981e6d95260d80dadf4 (diff) | |
download | dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar.gz dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar.bz2 dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar.lz dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar.xz dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.tar.zst dexon-consensus-41641e10286dd7b1fdcced6a51157e061d545ef5.zip |
misc: Polish BA. (#94)
Diffstat (limited to 'simulation/simulation.go')
-rw-r--r-- | simulation/simulation.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/simulation/simulation.go b/simulation/simulation.go index 4cfc79c..978107a 100644 --- a/simulation/simulation.go +++ b/simulation/simulation.go @@ -26,7 +26,7 @@ import ( ) // Run starts the simulation. -func Run(configPath string) { +func Run(configPath string, legacy bool) { cfg, err := config.Read(configPath) if err != nil { panic(err) @@ -65,7 +65,7 @@ func Run(configPath string) { for i := 0; i < cfg.Validator.Num; i++ { fmt.Printf("Validator %d: %s\n", i, vs[i].ID) - go vs[i].Run() + go vs[i].Run(legacy) } } else if networkType == config.NetworkTypeTCP { prv, err := eth.NewPrivateKey() @@ -75,7 +75,7 @@ func Run(configPath string) { network := NewTCPNetwork(false, cfg.Networking.PeerServer, networkModel) network.Start() v := NewValidator(prv, eth.SigToPub, cfg.Validator, network) - go v.Run() + go v.Run(legacy) vs = append(vs, v) } |