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

Bubble up genesis load errors instead of exiting #34851

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

steviez
Copy link
Contributor

@steviez steviez commented Jan 18, 2024

Problem

Currently, the function open_genesis_config() performs several operations that could fail, and unwraps / exits immediately.

Summary of Changes

Bubble the error up to allow the caller to decide what to do with the result. solana-validator and solana-ledger-tool will essentially have unchanged behavior as they both exit if this result is bad. But, this change removes one more place that could kill the process

@steviez steviez force-pushed the genesis_err_plumbing branch from 3982309 to 56f97ba Compare January 19, 2024 06:51
@steviez steviez requested a review from brooksprumo January 19, 2024 07:26
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (6976b75) 81.7% compared to head (56f97ba) 81.7%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34851     +/-   ##
=========================================
- Coverage    81.7%    81.7%   -0.1%     
=========================================
  Files         826      826             
  Lines      223168   223174      +6     
=========================================
- Hits       182446   182411     -35     
- Misses      40722    40763     +41     

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@steviez steviez merged commit 3dd3488 into solana-labs:master Jan 19, 2024
35 checks passed
@steviez steviez deleted the genesis_err_plumbing branch January 19, 2024 15:25
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