aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils_test.go')
-rw-r--r--core/utils_test.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/core/utils_test.go b/core/utils_test.go
index 81b093e..dd15607 100644
--- a/core/utils_test.go
+++ b/core/utils_test.go
@@ -21,10 +21,6 @@ import (
"testing"
"github.com/stretchr/testify/suite"
-
- "github.com/dexon-foundation/dexon-consensus/common"
- "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa"
- "github.com/dexon-foundation/dexon-consensus/core/types"
)
type UtilsTestSuite struct {
@@ -43,24 +39,6 @@ func (s *UtilsTestSuite) TestRemoveFromSortedUint32Slice() {
s.Equal([]uint32{}, removeFromSortedUint32Slice([]uint32{}, 1))
}
-func (s *UtilsTestSuite) TestVerifyBlock() {
- prv, err := ecdsa.NewPrivateKey()
- s.Require().NoError(err)
- auth := NewAuthenticator(prv)
- block := &types.Block{}
- auth.SignBlock(block)
- s.NoError(VerifyBlock(block))
-
- hash := block.Hash
- block.Hash = common.NewRandomHash()
- s.Equal(ErrIncorrectHash, VerifyBlock(block))
-
- block.Hash = hash
- block.Signature, err = prv.Sign(common.NewRandomHash())
- s.Require().NoError(err)
- s.Equal(ErrIncorrectSignature, VerifyBlock(block))
-}
-
func TestUtils(t *testing.T) {
suite.Run(t, new(UtilsTestSuite))
}