diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-08-21 16:43:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 16:43:37 +0800 |
commit | 2c816b5d636b8f7decd234582470a3d4c6b4a93a (patch) | |
tree | 5eff9d5f035dda8e3b2632ecce41f3c192e90f21 /core/test/app_test.go | |
parent | e8f99372159a89fb3128b870de1733a4777a5144 (diff) | |
download | tangerine-consensus-2c816b5d636b8f7decd234582470a3d4c6b4a93a.tar.gz tangerine-consensus-2c816b5d636b8f7decd234582470a3d4c6b4a93a.tar.zst tangerine-consensus-2c816b5d636b8f7decd234582470a3d4c6b4a93a.zip |
simulation: add simulation with scheduler (#71)
- Add new field in test.Event: HistoryIndex
HistoryIndex allow us to access them by their position in event history.
- Record local time in test.App when receiving events.
- Add statisitics module for slices of test.Event.
- add new command line utility *dexcon-simulation-with-scheduler
to verify the execution time of core.Consensus.
Diffstat (limited to 'core/test/app_test.go')
-rw-r--r-- | core/test/app_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/test/app_test.go b/core/test/app_test.go index 285773e..f4c4a74 100644 --- a/core/test/app_test.go +++ b/core/test/app_test.go @@ -11,18 +11,18 @@ import ( type AppTestSuite struct { suite.Suite - to1, to2, to3 *totalOrderDeliver + to1, to2, to3 *AppTotalOrderRecord } func (s *AppTestSuite) SetupSuite() { - s.to1 = &totalOrderDeliver{ + s.to1 = &AppTotalOrderRecord{ BlockHashes: common.Hashes{ common.NewRandomHash(), common.NewRandomHash(), }, Early: false, } - s.to2 = &totalOrderDeliver{ + s.to2 = &AppTotalOrderRecord{ BlockHashes: common.Hashes{ common.NewRandomHash(), common.NewRandomHash(), @@ -30,7 +30,7 @@ func (s *AppTestSuite) SetupSuite() { }, Early: false, } - s.to3 = &totalOrderDeliver{ + s.to3 = &AppTotalOrderRecord{ BlockHashes: common.Hashes{ common.NewRandomHash(), }, @@ -39,7 +39,7 @@ func (s *AppTestSuite) SetupSuite() { } func (s *AppTestSuite) setupAppByTotalOrderDeliver( - app *App, to *totalOrderDeliver) { + app *App, to *AppTotalOrderRecord) { for _, h := range to.BlockHashes { app.StronglyAcked(h) |