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

Clear the account paths before constructing a bank from a snapshot dir #31170

Merged

Conversation

xiangzhu70
Copy link
Contributor

@xiangzhu70 xiangzhu70 commented Apr 12, 2023

Problem

bank_from_snapshot_dir requires cleaning the <account_path>. It is cleaner to put this necessary cleaning into the function to avoid duplicate the cleaning code before each call.
This addresses the review comment. #31115 (comment)

Summary of Changes

Added the cleaning code in the function bank_from_snapshot_dir
Removed the cleaning code in the test.

Fixes #

@apfitzge apfitzge self-requested a review April 12, 2023 16:27
Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

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

lgtm once CI passes

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #31170 (57dc4ea) into master (9a7b6ab) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #31170   +/-   ##
=======================================
  Coverage    81.5%    81.5%           
=======================================
  Files         728      728           
  Lines      205767   205767           
=======================================
+ Hits       167800   167824   +24     
+ Misses      37967    37943   -24     

@xiangzhu70 xiangzhu70 marked this pull request as ready for review April 12, 2023 23:03
@xiangzhu70 xiangzhu70 merged commit 78d061a into solana-labs:master Apr 12, 2023
xiangzhu70 added a commit that referenced this pull request Apr 13, 2023
* bank_from_latest_snapshot_dir

* Clear the account paths before constructing a bank from a snapshot dir

* Clear the account paths before constructing a bank from a snapshot dir (#31170)

* use the highest POST snapshot dir to construct a bank

* Use POST to fix test_bank_from_latest_snapshot_dir

* Revert "Clear the account paths before constructing a bank from a snapshot dir"

This reverts commit 272bb9f.

* Remove the set_accounts_hash_for_tests call

* Revert "Revert "Clear the account paths before constructing a bank from a snapshot dir""

This reverts commit 2e345d8.
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Apr 14, 2023
* bank_from_latest_snapshot_dir

* Clear the account paths before constructing a bank from a snapshot dir

* Clear the account paths before constructing a bank from a snapshot dir (solana-labs#31170)

* use the highest POST snapshot dir to construct a bank

* Use POST to fix test_bank_from_latest_snapshot_dir

* Revert "Clear the account paths before constructing a bank from a snapshot dir"

This reverts commit 272bb9f.

* Remove the set_accounts_hash_for_tests call

* Revert "Revert "Clear the account paths before constructing a bank from a snapshot dir""

This reverts commit 2e345d8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants