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

Updates to negative stake fix #3037

Merged

Conversation

cwgoes
Copy link
Contributor

@cwgoes cwgoes commented Dec 7, 2018

  • Add back non-negative stake check (cannot be just positive because we keep validators in the unbonding queue)
  • Fix linter

cc @jaekwon


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@cwgoes cwgoes changed the base branch from develop to jae/removevalidator_negstake_fix December 7, 2018 17:39
@codecov
Copy link

codecov bot commented Dec 7, 2018

Codecov Report

Merging #3037 into jae/removevalidator_negstake_fix will decrease coverage by 0.02%.
The diff coverage is 100%.

@@                         Coverage Diff                          @@
##           jae/removevalidator_negstake_fix    #3037      +/-   ##
====================================================================
- Coverage                             52.18%   52.16%   -0.03%     
====================================================================
  Files                                   140      140              
  Lines                                  9768     9768              
====================================================================
- Hits                                   5097     5095       -2     
- Misses                                 4330     4332       +2     
  Partials                                341      341

defer proxyApp.Stop()
defer func() {
_ = proxyApp.Stop()
}()
Copy link
Contributor

Choose a reason for hiding this comment

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

confused as to why this is necessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably a linting error

Copy link
Contributor

@rigelrozanski rigelrozanski Dec 7, 2018

Choose a reason for hiding this comment

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

just double checked, it definitely was a linting error (errcheck).
should we not be checking this error still though?

	defer func() {
		err = proxyApp.Stop()
		if err != nil {
			panic(err)
		}
	}()

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess not actually because the error is only returned if the proxyApp is already stopped, which wouldn't be an issue in this case

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

changes lgtm 👌

@rigelrozanski rigelrozanski merged commit 2c0217f into jae/removevalidator_negstake_fix Dec 7, 2018
@cwgoes cwgoes deleted the cwgoes/updates-to-negstake-fix branch December 7, 2018 23:33
cwgoes pushed a commit that referenced this pull request Dec 8, 2018
* Fix negative stake & invariance bug

* Merge PR #3037: Updates to negative stake fix

* Update invariant; fix lint

* Fix linter

* Add comment & TODO
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.

3 participants