[vote] Add missing test case changing
@@ -53,8 +53,7 @@ func TestVoteResult(t *testing.T) {
err = InitVoteResult(scs, testResult)
assert.NoError(t, err, "failed to InitVoteResult")
- const getTestSize = 23
- result, err := GetVoteResult(scs)
+ result, err := GetVoteResult(scs, 23)
assert.NoError(t, err, "could not get vote result")
oldAmount := new(big.Int).SetUint64((uint64)(math.MaxUint64))
@@ -126,7 +125,7 @@ func TestBasicStakingVotingUnstaking(t *testing.T) {
err = voting(tx.Body, scs, VotingDelay)
assert.NoError(t, err, "voting failed")
- result, err := GetVoteResult(scs)
+ result, err := GetVoteResult(scs, 23)
assert.NoError(t, err, "voting failed")
assert.EqualValues(t, len(result.GetVotes()), 1, "invalid voting result")
assert.Equal(t, tx.Body.Payload[1:], result.GetVotes()[0].Candidate, "invalid candidate in voting result")
@@ -139,7 +138,7 @@ func TestBasicStakingVotingUnstaking(t *testing.T) {
err = unstaking(tx.Body, senderState, scs, VotingDelay+StakingDelay)
assert.NoError(t, err, "unstaking failed")
- result2, err := GetVoteResult(scs)
+ result2, err := GetVoteResult(scs, 23)
assert.NoError(t, err, "voting failed")
assert.EqualValues(t, len(result2.GetVotes()), 1, "invalid voting result")
assert.Equal(t, result.GetVotes()[0].Candidate, result2.GetVotes()[0].Candidate, "invalid candidate in voting result")
