aboutsummaryrefslogtreecommitdiffstats
path: root/core/crypto_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/crypto_test.go')
-rw-r--r--core/crypto_test.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/crypto_test.go b/core/crypto_test.go
index 5fc8ea7..5aefec5 100644
--- a/core/crypto_test.go
+++ b/core/crypto_test.go
@@ -131,12 +131,8 @@ func (s *CryptoTestSuite) TestVoteSignature() {
s.Require().NoError(err)
pub := prv.PublicKey()
nID := types.NewNodeID(pub)
- vote := &types.Vote{
- ProposerID: nID,
- Type: types.VoteInit,
- BlockHash: common.NewRandomHash(),
- Period: 1,
- }
+ vote := types.NewVote(types.VoteInit, common.NewRandomHash(), 1)
+ vote.ProposerID = nID
vote.Signature, err = prv.Sign(hashVote(vote))
s.Require().NoError(err)
ok, err := verifyVoteSignature(vote)