Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestHandleEquivocationProposal #734

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Fix TestHandleEquivocationProposal #734

merged 2 commits into from
Feb 16, 2023

Conversation

shaspitz
Copy link
Contributor

Description

TestHandleEquivocationProposal was recently added, the test involved calling GetConsensusAddress for two different addresses in HandleEquivocationProposal, both which would return nil.

This PR fixes the test to use valid cons addresses, unblocking #707

Type of change

  • Testing: Adds testing

Regression tests

n/a

New behavior tests

n/a

@@ -1045,8 +1045,14 @@ func TestHandleEquivocationProposal(t *testing.T) {
propPass := &providertypes.EquivocationProposal{
Equivocations: []*evidencetypes.Equivocation{tcPass[0], tcPass[1]},
}
keeper.SetSlashLog(ctx, tcPass[0].GetConsensusAddress())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, tcPass[0].GetConsensusAddress() would return nil here. This caused odd behavior in HandleEquivocationProposal

@shaspitz shaspitz marked this pull request as ready for review February 14, 2023 02:05
@shaspitz shaspitz mentioned this pull request Feb 14, 2023
1 task
Copy link
Contributor

@sainoe sainoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shaspitz shaspitz merged commit 558516f into main Feb 16, 2023
@shaspitz shaspitz deleted the fix-equiv-prop-ut branch February 16, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants