diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-11-09 12:23:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-09 12:23:58 +0800 |
commit | a7e3c046693d9df860422e71a14c8659b36afe6a (patch) | |
tree | 3c4148b202a3d2acb3e326198c10c1b4b35738f6 /core/consensus_test.go | |
parent | 71a1dd9c072fb64da026ebe56acd2d187ec272c8 (diff) | |
download | dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar.gz dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar.bz2 dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar.lz dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar.xz dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.tar.zst dexon-consensus-a7e3c046693d9df860422e71a14c8659b36afe6a.zip |
core: Extract VoteHeader (#313)
Diffstat (limited to 'core/consensus_test.go')
-rw-r--r-- | core/consensus_test.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/consensus_test.go b/core/consensus_test.go index f518630..176cceb 100644 --- a/core/consensus_test.go +++ b/core/consensus_test.go @@ -569,11 +569,8 @@ func (s *ConsensusTestSuite) TestSyncBA() { Position: pos, } for _, auth := range auths { - vote := &types.Vote{ - Type: types.VoteCom, - BlockHash: hash, - Position: pos, - } + vote := types.NewVote(types.VoteCom, hash, 0) + vote.Position = pos s.Require().NoError(auth.SignVote(vote)) baResult.Votes = append(baResult.Votes, *vote) } @@ -604,11 +601,8 @@ func (s *ConsensusTestSuite) TestSyncBA() { s.Require().NoError(auths[0].SignVote(&baResult.Votes[0])) for _, auth := range auths { - vote := &types.Vote{ - Type: types.VoteCom, - BlockHash: hash, - Position: pos, - } + vote := types.NewVote(types.VoteCom, hash, 0) + vote.Position = pos s.Require().NoError(auth.SignVote(vote)) baResult.Votes = append(baResult.Votes, *vote) } |