diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-18 15:00:27 +0800 |
---|---|---|
committer | haoping-ku <37325897+haoping-ku@users.noreply.github.com> | 2018-10-18 15:00:27 +0800 |
commit | 43299221c586bfb55e225799aedc6d133ba97c3f (patch) | |
tree | e607424430237698c4eb8f33e186643fc5849ca6 /core/test/blocks-generator_test.go | |
parent | 8303e9d054957195717f41804a456e2720b0c4bb (diff) | |
download | tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar.gz tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar.bz2 tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar.lz tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar.xz tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.tar.zst tangerine-consensus-43299221c586bfb55e225799aedc6d133ba97c3f.zip |
core: total ordering flush (#212)
* Implement flush
* Panic for all errors from total-ordering
* Fix test failure
All DAGs generated by blocks-generator would trigger round switching.
* Add NewBlocksGeneratorConfig
* Add test caes for numChains changes
* Resize internal structures
* Perform total ordering based on current numChains
* Fix not a valid DAG checking
* Comparing blocks by height is not correct
* Fix blocks from future round are delivered first by revealer
* Make sure only picking one candidate in one chain.
Blocks on the same chain in different rounds would not
have acking relation.
* Fix stuffs
* Fix the issue that two candidates from the same chain are picked.
* Rework candidateChainMapping
* Add test case for phi, k changed
* Refine testing code for round change
* Add breakpoints in global vector
* Remove not a valid dag checking.
* Adding comments
* Add check to forward acking
* Fix vet failure
* Prepareing height record with breakpoint
* Fixup: add check to make sure delivered round IDs are increasing.
Diffstat (limited to 'core/test/blocks-generator_test.go')
-rw-r--r-- | core/test/blocks-generator_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/test/blocks-generator_test.go b/core/test/blocks-generator_test.go index 0477664..fafbd6c 100644 --- a/core/test/blocks-generator_test.go +++ b/core/test/blocks-generator_test.go @@ -66,7 +66,7 @@ func (s *BlocksGeneratorTestSuite) TestGenerate() { req.Equal(block.Position.Round, uint64(1)) blocksByNode[block.ProposerID] = append(blocksByNode[block.ProposerID], &block) - sort.Sort(types.ByHeight(blocksByNode[block.ProposerID])) + sort.Sort(types.ByPosition(blocksByNode[block.ProposerID])) blocksByHash[block.Hash] = &block } // Make sure these two rules are hold for these blocks: |