aboutsummaryrefslogtreecommitdiffstats
path: root/core/dkg-tsig-protocol_test.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-02 17:12:57 +0800
committerGitHub <noreply@github.com>2018-10-02 17:12:57 +0800
commitd34f6b070e7361fcb582350ad8faf6148e82042e (patch)
tree77a9efa5965ef16778e023b93428309e908531c7 /core/dkg-tsig-protocol_test.go
parentfb27745f2ca4eaf66f53f48740cbd148ee15bbdf (diff)
downloaddexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar.gz
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar.bz2
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar.lz
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar.xz
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.tar.zst
dexon-consensus-d34f6b070e7361fcb582350ad8faf6148e82042e.zip
core: Export DKGGroupPublicKey and its verify function (#160)
Diffstat (limited to 'core/dkg-tsig-protocol_test.go')
-rw-r--r--core/dkg-tsig-protocol_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/dkg-tsig-protocol_test.go b/core/dkg-tsig-protocol_test.go
index 6273e53..1e8cac4 100644
--- a/core/dkg-tsig-protocol_test.go
+++ b/core/dkg-tsig-protocol_test.go
@@ -181,7 +181,7 @@ func (s *DKGTSIGProtocolTestSuite) TestDKGTSIGProtocol() {
}
// DKG is fininished.
- gpk, err := newDKGGroupPublicKey(round,
+ gpk, err := NewDKGGroupPublicKey(round,
gov.DKGMasterPublicKeys(round), gov.DKGComplaints(round),
k,
)
@@ -230,7 +230,7 @@ func (s *DKGTSIGProtocolTestSuite) TestDKGTSIGProtocol() {
sig, err := tsig.signature()
s.Require().NoError(err)
- s.True(gpk.verifySignature(msgHash, sig))
+ s.True(gpk.VerifySignature(msgHash, sig))
}
func (s *DKGTSIGProtocolTestSuite) TestNackComplaint() {
@@ -477,7 +477,7 @@ func (s *DKGTSIGProtocolTestSuite) TestQualifyIDs() {
s.Require().True(complaints[i].IsNack())
}
- gpk, err := newDKGGroupPublicKey(round,
+ gpk, err := NewDKGGroupPublicKey(round,
gov.DKGMasterPublicKeys(round), complaints,
k,
)
@@ -487,7 +487,7 @@ func (s *DKGTSIGProtocolTestSuite) TestQualifyIDs() {
s.NotEqual(id, byzantineID)
}
- gpk2, err := newDKGGroupPublicKey(round,
+ gpk2, err := NewDKGGroupPublicKey(round,
gov.DKGMasterPublicKeys(round), complaints[:k],
k,
)
@@ -497,7 +497,7 @@ func (s *DKGTSIGProtocolTestSuite) TestQualifyIDs() {
// Test for complaint.
complaints[0].PrivateShare.Signature = crypto.Signature{Signature: []byte{0}}
s.Require().False(complaints[0].IsNack())
- gpk3, err := newDKGGroupPublicKey(round,
+ gpk3, err := NewDKGGroupPublicKey(round,
gov.DKGMasterPublicKeys(round), complaints[:1],
k,
)
@@ -552,7 +552,7 @@ func (s *DKGTSIGProtocolTestSuite) TestPartialSignature() {
}
// DKG is fininished.
- gpk, err := newDKGGroupPublicKey(round,
+ gpk, err := NewDKGGroupPublicKey(round,
gov.DKGMasterPublicKeys(round), gov.DKGComplaints(round),
k,
)
@@ -613,7 +613,7 @@ func (s *DKGTSIGProtocolTestSuite) TestPartialSignature() {
sig, err := tsig.signature()
s.Require().NoError(err)
- s.True(gpk.verifySignature(msgHash, sig))
+ s.True(gpk.VerifySignature(msgHash, sig))
}
func TestDKGTSIGProtocol(t *testing.T) {