aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-03-13 15:38:33 +0800
committerGitHub <noreply@github.com>2019-03-13 15:38:33 +0800
commit8786160e28cf17c1125e26939b81ac59df5c260a (patch)
tree509444fbca35c37b1d073510e439a7b1f2f50768 /core/consensus.go
parent92d64e7e743f7afce6ab811bce4d57fc67297567 (diff)
downloaddexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar.gz
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar.bz2
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar.lz
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar.xz
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.tar.zst
dexon-consensus-8786160e28cf17c1125e26939b81ac59df5c260a.zip
core: recover DKG master private shares (#487)
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/consensus.go b/core/consensus.go
index e3a7b1a..4201cbc 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -538,6 +538,11 @@ 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 {
@@ -574,7 +579,6 @@ func newConsensusForRound(
baConfig := agreementMgrConfig{}
baConfig.from(initRound, initConfig, initCRS)
baConfig.SetRoundBeginHeight(initRoundBeginHeight)
- var err error
con.baMgr, err = newAgreementMgr(con, initRound, baConfig)
if err != nil {
panic(err)