aboutsummaryrefslogtreecommitdiffstats
path: root/core/agreement_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-11-09 12:23:58 +0800
committerGitHub <noreply@github.com>2018-11-09 12:23:58 +0800
commita7e3c046693d9df860422e71a14c8659b36afe6a (patch)
tree3c4148b202a3d2acb3e326198c10c1b4b35738f6 /core/agreement_test.go
parent71a1dd9c072fb64da026ebe56acd2d187ec272c8 (diff)
downloaddexon-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/agreement_test.go')
-rw-r--r--core/agreement_test.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/agreement_test.go b/core/agreement_test.go
index be66c96..52c9e4d 100644
--- a/core/agreement_test.go
+++ b/core/agreement_test.go
@@ -131,11 +131,7 @@ func (s *AgreementTestSuite) prepareVote(
nID types.NodeID, voteType types.VoteType, blockHash common.Hash,
period uint64) (
vote *types.Vote) {
- vote = &types.Vote{
- Type: voteType,
- BlockHash: blockHash,
- Period: period,
- }
+ vote = types.NewVote(voteType, blockHash, period)
s.Require().NoError(s.auths[nID].SignVote(vote))
return
}