aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/consensus.go b/core/consensus.go
index f4e3295..3601720 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -310,9 +310,10 @@ func NewConsensus(
}
// Run starts running DEXON Consensus.
-func (con *Consensus) Run() {
+func (con *Consensus) Run(initBlock *types.Block) {
// Setup context.
con.ctx, con.ctxCancel = context.WithCancel(context.Background())
+ con.ccModule.init(initBlock)
go con.processMsg(con.network.ReceiveChan())
con.cfgModule.registerDKG(con.round, int(con.currentConfig.DKGSetSize)/3+1)
con.event.RegisterTime(con.dMoment.Add(con.currentConfig.RoundInterval/4),