aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-03-18 18:03:27 +0800
committerGitHub <noreply@github.com>2019-03-18 18:03:27 +0800
commit8218cb1525872cc0c7f09335305bcbed484153ad (patch)
tree94964ca976e014d49e8b2d498e248a374ffa9192 /core/consensus.go
parent9e97ddc00c67ee13ceb8fc597f4f55cfd6df6101 (diff)
downloaddexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.gz
dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.zst
dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.zip
core: snapshot DKG protocol struct when finish any phase (#496)
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/consensus.go b/core/consensus.go
index 4d82222..7793129 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -563,11 +563,6 @@ func newConsensusForRound(
logger: logger,
}
cfgModule := newConfigurationChain(ID, recv, gov, nodeSetCache, db, logger)
- dkg, err := recoverDKGProtocol(ID, recv, initRound, utils.GetDKGThreshold(initConfig), db)
- if err != nil {
- panic(err)
- }
- cfgModule.dkg = dkg
recv.cfgModule = cfgModule
appModule := app
if usingNonBlocking {
@@ -598,6 +593,7 @@ func newConsensusForRound(
processBlockChan: make(chan *types.Block, 1024),
}
con.ctx, con.ctxCancel = context.WithCancel(context.Background())
+ var err error
if con.roundEvent, err = utils.NewRoundEvent(con.ctx, gov, logger, initRound,
initRoundBeginHeight, initBlockHeight, ConfigRoundShift); err != nil {
panic(err)