aboutsummaryrefslogtreecommitdiffstats
path: root/core/test
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-02 14:06:25 +0800
committerGitHub <noreply@github.com>2018-10-02 14:06:25 +0800
commitd7f6db871180b53548aed6a5450e1c5879c90b04 (patch)
treec70b9ef766c3b649c8ca3ac93d79f6f1794be3ce /core/test
parent658662d42d30c58e4f3951f5c1e99688de295397 (diff)
downloaddexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar.gz
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar.bz2
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar.lz
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar.xz
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.tar.zst
dexon-consensus-d7f6db871180b53548aed6a5450e1c5879c90b04.zip
core: remove ProposeThresholdSignature/GetThresholdSignature (#158)
Also rename the argument name of ProposeCRS.
Diffstat (limited to 'core/test')
-rw-r--r--core/test/governance.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/core/test/governance.go b/core/test/governance.go
index 62ebef0..6ae2462 100644
--- a/core/test/governance.go
+++ b/core/test/governance.go
@@ -110,8 +110,8 @@ func (g *Governance) GetCRS(round uint64) common.Hash {
}
// ProposeCRS propose a CRS.
-func (g *Governance) ProposeCRS(round uint64, crs []byte) {
- g.crs[round] = crypto.Keccak256Hash(crs)
+func (g *Governance) ProposeCRS(round uint64, signedCRS []byte) {
+ g.crs[round] = crypto.Keccak256Hash(signedCRS)
}
// GetPrivateKeys return the private key for that node, this function
@@ -123,23 +123,6 @@ func (g *Governance) GetPrivateKeys() (keys []crypto.PrivateKey) {
return
}
-// ProposeThresholdSignature porposes a ThresholdSignature of round.
-func (g *Governance) ProposeThresholdSignature(
- round uint64, signature crypto.Signature) {
- g.lock.Lock()
- defer g.lock.Unlock()
- g.tsig[round] = signature
-}
-
-// GetThresholdSignature gets a ThresholdSignature of round.
-func (g *Governance) GetThresholdSignature(round uint64) (
- sig crypto.Signature, exist bool) {
- g.lock.RLock()
- defer g.lock.RUnlock()
- sig, exist = g.tsig[round]
- return
-}
-
// AddDKGComplaint add a DKGComplaint.
func (g *Governance) AddDKGComplaint(complaint *types.DKGComplaint) {
g.lock.Lock()