aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/consensus_test.go')
-rw-r--r--core/consensus_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/consensus_test.go b/core/consensus_test.go
index 7748494..938b56d 100644
--- a/core/consensus_test.go
+++ b/core/consensus_test.go
@@ -644,16 +644,12 @@ func (s *ConsensusTestSuite) TestSyncBA() {
s.Equal(ErrIncorrectVoteSignature, con.ProcessAgreementResult(baResult))
s.Require().NoError(signers[0].SignVote(&baResult.Votes[0]))
- for _, signer := range signers {
- vote := types.NewVote(types.VoteCom, hash, 0)
- vote.Position = pos
- s.Require().NoError(signer.SignVote(vote))
- baResult.Votes = append(baResult.Votes, *vote)
- }
- s.Equal(ErrIncorrectVoteProposer, con.ProcessAgreementResult(baResult))
-
baResult.Votes = baResult.Votes[:1]
s.Equal(ErrNotEnoughVotes, con.ProcessAgreementResult(baResult))
+ for range signers {
+ baResult.Votes = append(baResult.Votes, baResult.Votes[0])
+ }
+ s.Equal(ErrNotEnoughVotes, con.ProcessAgreementResult(baResult))
}
func TestConsensus(t *testing.T) {