aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-15 11:17:59 +0800
committerWei-Ning Huang <aitjcize@gmail.com>2018-10-15 11:17:59 +0800
commit52d490fa7e6b108f71ffb8937554141d5c668ff1 (patch)
tree832567efb84766fafe67c2f83dd24e6c20e8a746 /core/consensus.go
parentc59b65f22bcd61b10c654ee784d6b8bef9fd3bca (diff)
downloadtangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar.gz
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar.bz2
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar.lz
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar.xz
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.tar.zst
tangerine-consensus-52d490fa7e6b108f71ffb8937554141d5c668ff1.zip
core: fix simulation error (#201)
* Sync dMoment for all consensus core * App check for randomness ignore round 0
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/consensus.go b/core/consensus.go
index b5cb445..52c896e 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -225,6 +225,7 @@ type Consensus struct {
// NewConsensus construct an Consensus instance.
func NewConsensus(
+ dMoment time.Time,
app Application,
gov Governance,
db blockdb.BlockDatabase,
@@ -233,8 +234,7 @@ func NewConsensus(
// TODO(w): load latest blockHeight from DB, and use config at that height.
var (
- round uint64
- dMoment = time.Now().UTC()
+ round uint64
)
config := gov.Configuration(round)
nodeSetCache := NewNodeSetCache(gov)