diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-04 18:30:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 18:30:03 +0800 |
commit | d4b4c8a05e94f66c85e7b4238ae5947b26f13c40 (patch) | |
tree | c2a10260820ac3a152506000aa03c41cd244d84f /integration_test | |
parent | 603f8d6d999c1bb5b16c2f5dfc88f8bc9da7fc33 (diff) | |
download | dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.gz dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.bz2 dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.lz dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.xz dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.tar.zst dexon-consensus-d4b4c8a05e94f66c85e7b4238ae5947b26f13c40.zip |
core: first few round will not have DKG (#455)
* core: Add DKGDelayRound constant
* core: use constant value
* core, utils: set DKGDelayRound for utils.
* test: add dkgDelayRound to state
* core: do not run dkg and crs for round < DKGDelayRound
* fix test
Diffstat (limited to 'integration_test')
-rw-r--r-- | integration_test/byzantine_test.go | 2 | ||||
-rw-r--r-- | integration_test/consensus_test.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/integration_test/byzantine_test.go b/integration_test/byzantine_test.go index 1e5a2a9..c90c9a1 100644 --- a/integration_test/byzantine_test.go +++ b/integration_test/byzantine_test.go @@ -139,7 +139,7 @@ func (s *ByzantineTestSuite) TestOneSlowNodeOneDeadNode() { // run faster. lambda := 100 * time.Millisecond seedGov, err := test.NewGovernance( - test.NewState( + test.NewState(core.DKGDelayRound, pubKeys, lambda, &common.NullLogger{}, true), core.ConfigRoundShift) req.NoError(err) diff --git a/integration_test/consensus_test.go b/integration_test/consensus_test.go index b469859..4f916c3 100644 --- a/integration_test/consensus_test.go +++ b/integration_test/consensus_test.go @@ -210,7 +210,7 @@ func (s *ConsensusTestSuite) TestSimple() { // Setup seed governance instance. Give a short latency to make this test // run faster. seedGov, err := test.NewGovernance( - test.NewState( + test.NewState(core.DKGDelayRound, pubKeys, 100*time.Millisecond, &common.NullLogger{}, true), core.ConfigRoundShift) req.NoError(err) @@ -255,7 +255,7 @@ func (s *ConsensusTestSuite) TestSetSizeChange() { req.NoError(err) // Setup seed governance instance. seedGov, err := test.NewGovernance( - test.NewState(pubKeys, 100*time.Millisecond, &common.NullLogger{}, true), + test.NewState(core.DKGDelayRound, pubKeys, 100*time.Millisecond, &common.NullLogger{}, true), core.ConfigRoundShift) req.NoError(err) req.NoError(seedGov.State().RequestChange( @@ -350,7 +350,7 @@ func (s *ConsensusTestSuite) TestSync() { // Setup seed governance instance. Give a short latency to make this test // run faster. seedGov, err := test.NewGovernance( - test.NewState( + test.NewState(core.DKGDelayRound, pubKeys, 100*time.Millisecond, &common.NullLogger{}, true), core.ConfigRoundShift) req.NoError(err) |