aboutsummaryrefslogtreecommitdiffstats
path: root/core/crypto_test.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-03 23:23:43 +0800
committerGitHub <noreply@github.com>2018-10-03 23:23:43 +0800
commitf16fd59cccc5a5ba7438836c39151d4f677b5042 (patch)
tree91b815110420df38ff0572c4b22a43e271726a60 /core/crypto_test.go
parentf5f34f81f8f3149adb002c65a7cc0cfa1244f77d (diff)
downloaddexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.gz
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.bz2
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.lz
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.xz
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.zst
dexon-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.zip
core: export some crypto verification function (#166)
verifyDKGMasterPublicKeySignature and verifyDKGComplaintSignature are needed in the governance contract to verify the signature. Export than so fullnode can use it.
Diffstat (limited to 'core/crypto_test.go')
-rw-r--r--core/crypto_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/crypto_test.go b/core/crypto_test.go
index 85bfb63..1fdc802 100644
--- a/core/crypto_test.go
+++ b/core/crypto_test.go
@@ -184,9 +184,9 @@ func (s *CryptoTestSuite) TestDKGSignature() {
}
mpk.Signature, err = prv.Sign(hashDKGMasterPublicKey(mpk))
s.Require().Nil(err)
- s.True(verifyDKGMasterPublicKeySignature(mpk))
+ s.True(VerifyDKGMasterPublicKeySignature(mpk))
mpk.Round++
- s.False(verifyDKGMasterPublicKeySignature(mpk))
+ s.False(VerifyDKGMasterPublicKeySignature(mpk))
complaint := &types.DKGComplaint{
ProposerID: nID,
@@ -195,9 +195,9 @@ func (s *CryptoTestSuite) TestDKGSignature() {
}
complaint.Signature, err = prv.Sign(hashDKGComplaint(complaint))
s.Require().Nil(err)
- s.True(verifyDKGComplaintSignature(complaint))
+ s.True(VerifyDKGComplaintSignature(complaint))
complaint.Round++
- s.False(verifyDKGComplaintSignature(complaint))
+ s.False(VerifyDKGComplaintSignature(complaint))
sig := &types.DKGPartialSignature{
ProposerID: nID,