diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-11 16:45:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 16:45:38 +0800 |
commit | 5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63 (patch) | |
tree | bdbecd8695ed5225aa24f56b6a3c0acc7244f68f /core/consensus.go | |
parent | 269fed574986331e07bf931b2c9b1a495c40f8ac (diff) | |
download | dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar.gz dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar.bz2 dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar.lz dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar.xz dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.tar.zst dexon-consensus-5b0aad05d7ccc1dabedfd1f3bfc0d584db849e63.zip |
core: change CRSSignature with bls (#563)
Diffstat (limited to 'core/consensus.go')
-rw-r--r-- | core/consensus.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/consensus.go b/core/consensus.go index 966c70a..49f2db1 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -656,6 +656,14 @@ func newConsensusForRound( } cfgModule := newConfigurationChain(ID, recv, gov, nodeSetCache, db, logger) recv.cfgModule = cfgModule + signer.SetBLSSigner( + func(round uint64, hash common.Hash) (crypto.Signature, error) { + _, signer, err := cfgModule.getDKGInfo(round, false) + if err != nil { + return crypto.Signature{}, err + } + return crypto.Signature(signer.sign(hash)), nil + }) appModule := app if usingNonBlocking { appModule = newNonBlocking(app, debugApp) |