From cfe1123701f892f9d652848714bdc9e56d80b0b8 Mon Sep 17 00:00:00 2001 From: envestcc Date: Tue, 25 Jun 2024 22:25:05 +0800 Subject: [PATCH] update test --- action/protocol/staking/vote_reviser_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action/protocol/staking/vote_reviser_test.go b/action/protocol/staking/vote_reviser_test.go index e101c0892b..82f861ec92 100644 --- a/action/protocol/staking/vote_reviser_test.go +++ b/action/protocol/staking/vote_reviser_test.go @@ -227,7 +227,6 @@ func TestVoteReviser(t *testing.T) { r.Nil(csm.GetByName(oldCand.Name)) } -// TODO: merge TestVoteRevise_CorrectEndorsement and TestVoteRevise_CorrectSelfStake func TestVoteRevise_CorrectEndorsement(t *testing.T) { r := require.New(t) t.Run("correct endorse height", func(t *testing.T) { @@ -282,10 +281,6 @@ func TestVoteRevise_CorrectEndorsement(t *testing.T) { r.ErrorIs(err, state.ErrStateNotExist) }) }) -} - -func TestVoteRevise_CorrectSelfStake(t *testing.T) { - r := require.New(t) t.Run("correct selfstake height", func(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ SelfStakeBucketReviseHeights: []uint64{1, 3}, @@ -324,6 +319,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ VoteWeight: g.VoteWeightCalConsts, SelfStakeBucketReviseHeights: []uint64{2}, + ReviseHeights: []uint64{2}, }) bkt := &VoteBucket{ Index: 0, @@ -359,6 +355,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ VoteWeight: g.VoteWeightCalConsts, SelfStakeBucketReviseHeights: []uint64{2}, + ReviseHeights: []uint64{2}, }) bkt := &VoteBucket{ Index: 1, @@ -398,6 +395,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ VoteWeight: g.VoteWeightCalConsts, SelfStakeBucketReviseHeights: []uint64{2}, + ReviseHeights: []uint64{2}, }) bkt := &VoteBucket{ Candidate: identityset.Address(3), @@ -434,6 +432,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ VoteWeight: g.VoteWeightCalConsts, SelfStakeBucketReviseHeights: []uint64{2}, + ReviseHeights: []uint64{2}, }) bkt := &VoteBucket{ Candidate: identityset.Address(4), @@ -470,6 +469,7 @@ func TestVoteRevise_CorrectSelfStake(t *testing.T) { revise := NewVoteReviser(ReviseConfig{ VoteWeight: g.VoteWeightCalConsts, SelfStakeBucketReviseHeights: []uint64{2}, + ReviseHeights: []uint64{2}, }) bkt := &VoteBucket{ Candidate: identityset.Address(5),