aboutsummaryrefslogtreecommitdiffstats
path: root/core/total-ordering-syncer_test.go
diff options
context:
space:
mode:
authorhaoping-ku <haoping.ku@dexon.org>2018-11-08 14:41:47 +0800
committerGitHub <noreply@github.com>2018-11-08 14:41:47 +0800
commit57e2b93fc2fe7fb04374c9e9b6381791aeeffa34 (patch)
tree3c110d4364ad9e916ea5953873794d49a62a76e7 /core/total-ordering-syncer_test.go
parent6934243d0690384363a3cf9cd11d8a45c2ce15ac (diff)
downloadtangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar.gz
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar.bz2
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar.lz
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar.xz
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.tar.zst
tangerine-consensus-57e2b93fc2fe7fb04374c9e9b6381791aeeffa34.zip
core: lattice, total-ordering: remove newGenesisConfig (#308)
* core: lattice, total-ordering: remove newGenesisConfig * fixup
Diffstat (limited to 'core/total-ordering-syncer_test.go')
-rw-r--r--core/total-ordering-syncer_test.go18
1 files changed, 7 insertions, 11 deletions
diff --git a/core/total-ordering-syncer_test.go b/core/total-ordering-syncer_test.go
index e20b438..5f9fd0f 100644
--- a/core/total-ordering-syncer_test.go
+++ b/core/total-ordering-syncer_test.go
@@ -35,20 +35,16 @@ type TotalOrderingSyncerTestSuite struct {
func (s *TotalOrderingSyncerTestSuite) genDeliverySet(numChains uint32) (
deliverySet [][]*types.Block, revealer *test.RandomDAGRevealer) {
- phi := uint64(numChains) / 2
genesisTime := time.Now().UTC()
-
- genesisConfig := &totalOrderingConfig{
- roundBasedConfig: roundBasedConfig{
- roundInterval: 1000 * time.Second,
- },
- k: 0,
- phi: phi,
- numChains: numChains,
+ genesisConfig := &types.Config{
+ K: 0,
+ PhiRatio: 0.5,
+ NumChains: numChains,
+ RoundInterval: 1000 * time.Second,
}
- genesisConfig.setRoundBeginTime(genesisTime)
- to := newTotalOrdering(genesisConfig)
+
+ to := newTotalOrdering(genesisTime, genesisConfig)
gen := test.NewBlocksGenerator(&test.BlocksGeneratorConfig{
NumChains: numChains,