From 57e2b93fc2fe7fb04374c9e9b6381791aeeffa34 Mon Sep 17 00:00:00 2001 From: haoping-ku Date: Thu, 8 Nov 2018 14:41:47 +0800 Subject: core: lattice, total-ordering: remove newGenesisConfig (#308) * core: lattice, total-ordering: remove newGenesisConfig * fixup --- core/total-ordering-syncer_test.go | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'core/total-ordering-syncer_test.go') 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, -- cgit v1.2.3