From f16fd59cccc5a5ba7438836c39151d4f677b5042 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Wed, 3 Oct 2018 23:23:43 +0800 Subject: 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. --- core/crypto_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/crypto_test.go') 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, -- cgit v1.2.3