From 39cf951c427179e432861473fa4e2f67810dff22 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Mon, 15 Oct 2018 15:58:41 +0800 Subject: Remove duplicated dMoment in Consensus.Run (#206) --- core/consensus.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/consensus.go') diff --git a/core/consensus.go b/core/consensus.go index 526ced5..368970c 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -215,6 +215,7 @@ type Consensus struct { tickerObj Ticker // Misc. + dMoment time.Time nodeSetCache *NodeSetCache round uint64 lock sync.RWMutex @@ -282,6 +283,7 @@ func NewConsensus( tickerObj: newTicker(gov, round, TickerBA), dkgReady: sync.NewCond(&sync.Mutex{}), cfgModule: cfgModule, + dMoment: dMoment, nodeSetCache: nodeSetCache, ctx: ctx, ctxCancel: ctxCancel, @@ -315,12 +317,12 @@ func NewConsensus( } // Run starts running DEXON Consensus. -func (con *Consensus) Run(dMoment time.Time) { +func (con *Consensus) Run() { go con.processMsg(con.network.ReceiveChan()) con.runDKGTSIG(con.round) round1 := uint64(1) con.lattice.AppendConfig(round1, con.gov.Configuration(round1)) - con.initialRound(dMoment) + con.initialRound(con.dMoment) ticks := make([]chan struct{}, 0, con.currentConfig.NumChains) for i := uint32(0); i < con.currentConfig.NumChains; i++ { tick := make(chan struct{}) -- cgit v1.2.3