aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-31 11:09:03 +0800
committerGitHub <noreply@github.com>2018-08-31 11:09:03 +0800
commit123a7ee3bcf96c5bbef2ea16737d1a8e25f5ef30 (patch)
tree004a0ff30da7095fa354de2ecc6f0ddf7758ee45 /simulation
parent96554a3bc14030e5d0dfc9dc1ee6bcdd9a133fa8 (diff)
downloadtangerine-consensus-123a7ee3bcf96c5bbef2ea16737d1a8e25f5ef30.tar.gz
tangerine-consensus-123a7ee3bcf96c5bbef2ea16737d1a8e25f5ef30.tar.zst
tangerine-consensus-123a7ee3bcf96c5bbef2ea16737d1a8e25f5ef30.zip
Use Network in Consensus core (#85)
Diffstat (limited to 'simulation')
-rw-r--r--simulation/validator.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/simulation/validator.go b/simulation/validator.go
index 8a672c5..a54c848 100644
--- a/simulation/validator.go
+++ b/simulation/validator.go
@@ -100,7 +100,10 @@ func (v *Validator) Run() {
}
}
v.consensus = core.NewConsensus(
- v.app, v.gov, v.db, v.prvKey, v.sigToPub)
+ v.app, v.gov, v.db, v.network,
+ time.NewTicker(
+ time.Duration(v.config.ProposeIntervalMean)*time.Millisecond),
+ v.prvKey, v.sigToPub)
genesisBlock := &types.Block{
ProposerID: v.ID,