aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-01-03 16:00:45 +0800
committerGitHub <noreply@github.com>2019-01-03 16:00:45 +0800
commit09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8 (patch)
tree12362787be4d3b6bcd0051591a7bc0c60d859878 /integration_test
parent5739e74781092ac09d8b3a575cddc71b50beedf4 (diff)
downloaddexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar.gz
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar.bz2
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar.lz
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar.xz
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.tar.zst
dexon-consensus-09a00a0580c2fd6e11b17f1793edca5f7bb2f5f8.zip
simulation: add latency for gossip (#389)
Diffstat (limited to 'integration_test')
-rw-r--r--integration_test/consensus_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/integration_test/consensus_test.go b/integration_test/consensus_test.go
index 5c3f181..fa62bda 100644
--- a/integration_test/consensus_test.go
+++ b/integration_test/consensus_test.go
@@ -68,11 +68,12 @@ func (s *ConsensusTestSuite) setupNodes(
dbInst, err := db.NewMemBackedDB()
s.Require().NoError(err)
// Prepare essential modules: app, gov, db.
- networkModule := test.NewNetwork(
- k.PublicKey(),
- &test.FixedLatencyModel{},
- test.NewDefaultMarshaller(nil),
- test.NetworkConfig{Type: test.NetworkTypeFake})
+ networkModule := test.NewNetwork(k.PublicKey(), test.NetworkConfig{
+ Type: test.NetworkTypeFake,
+ DirectLatency: &test.FixedLatencyModel{},
+ GossipLatency: &test.FixedLatencyModel{},
+ Marshaller: test.NewDefaultMarshaller(nil)},
+ )
gov := seedGov.Clone()
gov.SwitchToRemoteMode(networkModule)
gov.NotifyRoundHeight(0, 0)