aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-23 14:13:58 +0800
committerGitHub <noreply@github.com>2018-10-23 14:13:58 +0800
commit50e7b0fcb7fd78218be68f32f818713e6933a9e8 (patch)
treefa94e72569a31fb1b22472b62f94697f23d834db /simulation
parente909644bdb92ea827c0f5b0a850bce0217d02e08 (diff)
downloaddexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar.gz
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar.bz2
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar.lz
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar.xz
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.tar.zst
dexon-consensus-50e7b0fcb7fd78218be68f32f818713e6933a9e8.zip
core: add round parameter to ProposeCRS method (#244)
Since all DKG set members may ProposeCRS, but only one will get through, we need to be able to tell which round the CRS is intended for in order to skip CRS submission of the same round. Also this commit add check to make sure we have enough master public key when initializing DKGGroupPublicKey.
Diffstat (limited to 'simulation')
-rw-r--r--simulation/governance.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/simulation/governance.go b/simulation/governance.go
index 0a2c886..fb6ac5c 100644
--- a/simulation/governance.go
+++ b/simulation/governance.go
@@ -120,7 +120,7 @@ func (g *simGovernance) NotifyRoundHeight(round, height uint64) {
}
// ProposeCRS proposes a CRS of round.
-func (g *simGovernance) ProposeCRS(signedCRS []byte) {
+func (g *simGovernance) ProposeCRS(round uint64, signedCRS []byte) {
crs := crypto.Keccak256Hash(signedCRS)
if g.crs[len(g.crs)-1].Equal(crs) {
return