diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-02-25 19:35:06 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | b708ec0f082d431dfe6d56882d58043811647ac7 (patch) | |
tree | 575195174be8546146d64b79760288b5f5a8e7b4 /consensus/dexcon/fake_dexcon.go | |
parent | e83bcc1097d49b46b79131e546f1270b9192cc05 (diff) | |
download | dexon-b708ec0f082d431dfe6d56882d58043811647ac7.tar.gz dexon-b708ec0f082d431dfe6d56882d58043811647ac7.tar.zst dexon-b708ec0f082d431dfe6d56882d58043811647ac7.zip |
core: vm: flatten governance
Diffstat (limited to 'consensus/dexcon/fake_dexcon.go')
-rw-r--r-- | consensus/dexcon/fake_dexcon.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/consensus/dexcon/fake_dexcon.go b/consensus/dexcon/fake_dexcon.go index ca48b5275..ae7bed90e 100644 --- a/consensus/dexcon/fake_dexcon.go +++ b/consensus/dexcon/fake_dexcon.go @@ -6,6 +6,7 @@ import ( "time" coreCommon "github.com/dexon-foundation/dexon-consensus/common" + dexCore "github.com/dexon-foundation/dexon-consensus/core" coreCrypto "github.com/dexon-foundation/dexon-consensus/core/crypto" coreDKG "github.com/dexon-foundation/dexon-consensus/core/crypto/dkg" coreEcdsa "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa" @@ -250,7 +251,12 @@ func (n *NodeSet) Randomness(round uint64, hash common.Hash) []byte { } func (n *NodeSet) SignCRS(round uint64) { - signedCRS := n.TSig(round, n.crs[round]) + var signedCRS []byte + if round < dexCore.DKGDelayRound { + signedCRS = crypto.Keccak256(n.signedCRS[round]) + } else { + signedCRS = n.TSig(round, n.crs[round]) + } n.signedCRS[round+1] = signedCRS n.crs[round+1] = crypto.Keccak256Hash(signedCRS) } |