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 fragile tests in prep of stake rewrite pr #13654

Merged
merged 7 commits into from
Nov 20, 2020

Conversation

ryoqun
Copy link
Member

@ryoqun ryoqun commented Nov 17, 2020

Problem

Existing tests are creating bad stake accounts which are less than rent_exempt_reserve, notably only 42 lamports... #13461 will forbid such accounts. So, fix tests first.

Summary of Changes

Not ideal, but just hacky mindless replacement: BOOTSTRAP_VALIDATOR_LAMPORTS => bootstrap_validator_lamports()

Fixes #

runtime/src/genesis_utils.rs Outdated Show resolved Hide resolved
runtime/src/genesis_utils.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #13654 (c947dda) into master (df1f539) will decrease coverage by 0.0%.
The diff coverage is 93.7%.

@@            Coverage Diff            @@
##           master   #13654     +/-   ##
=========================================
- Coverage    82.1%    82.1%   -0.1%     
=========================================
  Files         378      378             
  Lines       91310    91320     +10     
=========================================
+ Hits        75023    75028      +5     
- Misses      16287    16292      +5     

CriesofCarrots
CriesofCarrots previously approved these changes Nov 18, 2020
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Thanks for the separate PR for this, and for the polish! lgtm w/ CI

@mergify mergify bot dismissed CriesofCarrots’s stale review November 18, 2020 17:20

Pull request has been modified.

@ryoqun ryoqun merged commit b74d7b5 into solana-labs:master Nov 20, 2020
mergify bot pushed a commit that referenced this pull request Nov 20, 2020
* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!

(cherry picked from commit b74d7b5)
@ryoqun
Copy link
Member Author

ryoqun commented Nov 20, 2020

Strictly speaking, #13461 didn't needed this. But, anyway I merged this because it's nice to have. Also, backported to v1.4 because this is test only change (very low risk) and to avoid future backport churn for inflation changes (arguably, essential).

mergify bot added a commit that referenced this pull request Nov 20, 2020
* Fix fragile tests in prep of stake rewrite pr

* Restore BOOTSTRAP_VALIDATOR_LAMPORTS where appropriate

* Further clean up

* Further clean up

* Aligh with other call site change

* Remove false warn!

* fix ci!

(cherry picked from commit b74d7b5)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
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.

2 participants