diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-08-30 15:09:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 15:09:15 +0800 |
commit | 8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8 (patch) | |
tree | b9ea30e61b410557cc87aa4d828c4cb3cf771984 /core/reliable-broadcast_test.go | |
parent | 1f34da04eb9d80648349140eb1442cab87ba5cd8 (diff) | |
download | tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar.gz tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar.bz2 tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar.lz tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar.xz tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.tar.zst tangerine-consensus-8cb1d5c4f3f7f93d8b2c54addf5c2caced0a1eb8.zip |
core: tune total ordering performance (#81)
- Replace map with slice
Compared to slice, accessing to map is slower and
the memory usage is inefficient.
Diffstat (limited to 'core/reliable-broadcast_test.go')
-rw-r--r-- | core/reliable-broadcast_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/reliable-broadcast_test.go b/core/reliable-broadcast_test.go index c6e9400..28edda7 100644 --- a/core/reliable-broadcast_test.go +++ b/core/reliable-broadcast_test.go @@ -514,7 +514,8 @@ func (s *ReliableBroadcastTest) TestRandomlyGeneratedBlocks() { } }() gen := test.NewBlocksGenerator(nil, hashBlock) - s.Require().Nil(gen.Generate(validatorCount, blockCount, nil, db)) + _, err = gen.Generate(validatorCount, blockCount, nil, db) + s.Require().Nil(err) iter, err := db.GetAll() s.Require().Nil(err) // Setup a revealer that would reveal blocks randomly. |