aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-18 09:07:52 +0800
committerGitHub <noreply@github.com>2018-09-18 09:07:52 +0800
commit81cf96477127a2da8843d544802027c7061a9c06 (patch)
tree70c06aec5df92df1dd93b605cc7afdbd2b8b0347 /integration_test
parent8a908e98279d7e80978cd412057eddd4a6bbf06c (diff)
downloadtangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar.gz
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar.bz2
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar.lz
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar.xz
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.tar.zst
tangerine-consensus-81cf96477127a2da8843d544802027c7061a9c06.zip
core: remove ticker parameter from NewConsensus
- remove BlockProposingInterval, it's replaced by lambda. - remove ticker parameter of NewConsensus, ticker would be derived from governance. - leave a backdoor to hook the construction of ticker. - move 'Lambda' config from to consensus.
Diffstat (limited to 'integration_test')
-rw-r--r--integration_test/utils.go4
-rw-r--r--integration_test/validator.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/integration_test/utils.go b/integration_test/utils.go
index de7e6ab..57bb2bc 100644
--- a/integration_test/utils.go
+++ b/integration_test/utils.go
@@ -1,6 +1,8 @@
package integration
import (
+ "time"
+
"github.com/dexon-foundation/dexon-consensus-core/core/blockdb"
"github.com/dexon-foundation/dexon-consensus-core/core/test"
"github.com/dexon-foundation/dexon-consensus-core/core/types"
@@ -25,7 +27,7 @@ func PrepareValidators(
dbs = make(map[types.ValidatorID]blockdb.BlockDatabase)
validators = make(map[types.ValidatorID]*Validator)
- gov, err := test.NewGovernance(validatorCount, 700)
+ gov, err := test.NewGovernance(validatorCount, 700*time.Millisecond)
if err != nil {
return
}
diff --git a/integration_test/validator.go b/integration_test/validator.go
index a110ab0..18e5c00 100644
--- a/integration_test/validator.go
+++ b/integration_test/validator.go
@@ -102,8 +102,7 @@ func NewValidator(
networkLatency: networkLatency,
proposingLatency: proposingLatency,
cons: core.NewConsensus(
- app, gov,
- db, &Network{}, time.NewTicker(1), privateKey, eth.SigToPub),
+ app, gov, db, &Network{}, privateKey, eth.SigToPub),
}
}