Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Fix fragile tests in prep of stake rewrite pr#13654

Merged
ryoqun merged 7 commits intosolana-labs:masterfrom
ryoqun:reduce-overage-stake-tests-prep
Nov 20, 2020
Merged

Fix fragile tests in prep of stake rewrite pr#13654
ryoqun merged 7 commits intosolana-labs:masterfrom
ryoqun:reduce-overage-stake-tests-prep

Conversation

@ryoqun
Copy link
Copy Markdown
Contributor

@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 #

@ryoqun ryoqun added the v1.4 label Nov 17, 2020
Comment thread runtime/src/genesis_utils.rs Outdated
Comment thread runtime/src/genesis_utils.rs Outdated
@codecov
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor 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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants