diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-03 23:23:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-03 23:23:43 +0800 |
commit | f16fd59cccc5a5ba7438836c39151d4f677b5042 (patch) | |
tree | 91b815110420df38ff0572c4b22a43e271726a60 /core/crypto_test.go | |
parent | f5f34f81f8f3149adb002c65a7cc0cfa1244f77d (diff) | |
download | tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.gz tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.bz2 tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.lz tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.xz tangerine-consensus-f16fd59cccc5a5ba7438836c39151d4f677b5042.tar.zst tangerine-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.go | 8 |
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, |