diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-09-11 14:56:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 14:56:47 +0800 |
commit | 292ad73ec08621fa9beef5f028860131fcbf9bd9 (patch) | |
tree | 47644eaad7757cd2e8798ae7fe361fa5d6e99060 /cmd/dexcon-simulation/main.go | |
parent | 582a491aa0bcb784ac7b65ebbfb42139945ea703 (diff) | |
download | dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar.gz dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar.bz2 dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar.lz dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar.xz dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.tar.zst dexon-consensus-292ad73ec08621fa9beef5f028860131fcbf9bd9.zip |
simulation: integrate test.Transport (#99)
- Add marshaller for simulation by encoding/json
- Implement peer server based on test.TranportServer
- Remove network models, they are replaced with test.LatencyModel
Diffstat (limited to 'cmd/dexcon-simulation/main.go')
-rw-r--r-- | cmd/dexcon-simulation/main.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/dexcon-simulation/main.go b/cmd/dexcon-simulation/main.go index 017cca5..126b832 100644 --- a/cmd/dexcon-simulation/main.go +++ b/cmd/dexcon-simulation/main.go @@ -66,7 +66,11 @@ func main() { defer pprof.StopCPUProfile() } - simulation.Run(*configFile, *legacy) + cfg, err := config.Read(*configFile) + if err != nil { + panic(err) + } + simulation.Run(cfg, *legacy) if *memprofile != "" { f, err := os.Create(*memprofile) |