diff options
Diffstat (limited to 'core/consensus.go')
-rw-r--r-- | core/consensus.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index d3f8b5d..05e3301 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -314,6 +314,13 @@ func (con *Consensus) Run(initBlock *types.Block) { // Setup context. con.ctx, con.ctxCancel = context.WithCancel(context.Background()) con.ccModule.init(initBlock) + // TODO(jimmy-dexon): change AppendConfig to add config for specific round. + for i := uint64(0); i < initBlock.Position.Round; i++ { + cfg := con.gov.Configuration(i + 1) + if err := con.lattice.AppendConfig(i+1, cfg); err != nil { + panic(err) + } + } 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), |