aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/crypto_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils/crypto_test.go')
-rw-r--r--core/utils/crypto_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/utils/crypto_test.go b/core/utils/crypto_test.go
index 5dfd82b..24ea68e 100644
--- a/core/utils/crypto_test.go
+++ b/core/utils/crypto_test.go
@@ -127,6 +127,7 @@ func (s *CryptoTestSuite) TestVoteSignature() {
}
func (s *CryptoTestSuite) TestCRSSignature() {
+ dkgDelayRound = 1
crs := common.NewRandomHash()
prv, err := ecdsa.NewPrivateKey()
s.Require().NoError(err)
@@ -135,14 +136,12 @@ func (s *CryptoTestSuite) TestCRSSignature() {
block := &types.Block{
ProposerID: nID,
}
- block.CRSSignature, err = prv.Sign(hashCRS(block, crs))
- s.Require().NoError(err)
- ok, err := VerifyCRSSignature(block, crs)
- s.Require().NoError(err)
+ hash := hashCRS(block, crs)
+ block.CRSSignature.Signature = hash[:]
+ ok := VerifyCRSSignature(block, crs, nil)
s.True(ok)
block.Position.Height++
- ok, err = VerifyCRSSignature(block, crs)
- s.Require().NoError(err)
+ ok = VerifyCRSSignature(block, crs, nil)
s.False(ok)
}