aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-02-20 12:53:18 +0800
committerGitHub <noreply@github.com>2019-02-20 12:53:18 +0800
commit8ef4fc213703620fbfa13890dee042d40eea8545 (patch)
treeba9a07d2423314396e5677b7294122caa505ae9a /core/consensus_test.go
parent2cf18fd299ea0fc270b213343314cab652cac271 (diff)
downloadtangerine-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.gz
tangerine-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.zst
tangerine-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.zip
core: switch round by block height (#450)
Diffstat (limited to 'core/consensus_test.go')
-rw-r--r--core/consensus_test.go17
1 files changed, 3 insertions, 14 deletions
diff --git a/core/consensus_test.go b/core/consensus_test.go
index fe28320..ca619df 100644
--- a/core/consensus_test.go
+++ b/core/consensus_test.go
@@ -203,16 +203,6 @@ func (s *ConsensusTestSuite) prepareConsensus(
return app, con
}
-func (s *ConsensusTestSuite) prepareAgreementMgrWithoutRunning(
- con *Consensus, numChains uint32) {
- // This is a workaround to setup agreementMgr.
- con.baMgr.appendConfig(0, &types.Config{
- NumChains: numChains,
- RoundInterval: time.Hour,
- LambdaBA: 50 * time.Millisecond,
- }, common.NewRandomHash())
-}
-
func (s *ConsensusTestSuite) TestDKGCRS() {
n := 21
lambda := 200 * time.Millisecond
@@ -229,7 +219,7 @@ func (s *ConsensusTestSuite) TestDKGCRS() {
gov, err := test.NewGovernance(test.NewState(
pubKeys, lambda, &common.NullLogger{}, true), ConfigRoundShift)
s.Require().NoError(err)
- gov.State().RequestChange(test.StateChangeRoundInterval, 200*lambda)
+ gov.State().RequestChange(test.StateChangeRoundInterval, uint64(200))
cons := map[types.NodeID]*Consensus{}
dMoment := time.Now().UTC()
for _, key := range prvKeys {
@@ -281,9 +271,8 @@ func (s *ConsensusTestSuite) TestSyncBA() {
signers = append(signers, utils.NewSigner(prvKey))
}
pos := types.Position{
- Round: 0,
- ChainID: 0,
- Height: 20,
+ Round: 0,
+ Height: 20,
}
baResult := &types.AgreementResult{
BlockHash: hash,