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

Break genesis loading and checks out of load_blockstore() #2436

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

steviez
Copy link

@steviez steviez commented Aug 5, 2024

Problem

Currently, load_blockstore() does much more than just load the blockstore. Aside from the name being confusing, everything being in that single function caused some inefficiency, such as loading genesis a second time to have the config available earlier.

Summary of Changes

So, break opening genesis and genesis related checks into a separate function.

Currently, load_blockstore() does much more than just load the
blockstore. Aside from the name being confusing, everything being in
that single function caused some inefficiency, such as loading genesis a
second time to have the config available earlier.

So, break opening genesis and genesis related checks into a separate
function. Also, add some variants to ValidatorError for the genesis
specific errors to keep the error messages in one central place.
@steviez steviez requested a review from brooksprumo August 5, 2024 14:37
Copy link

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

:shipit:

Refactor looks good to me.

@steviez steviez merged commit a1c00e5 into anza-xyz:master Aug 5, 2024
42 checks passed
@steviez steviez deleted the val_load_genesis branch August 5, 2024 15:21
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
)

Currently, load_blockstore() does much more than just load the
blockstore. Aside from the name being confusing, everything being in
that single function caused some inefficiency, such as loading genesis a
second time to have the config available earlier.

So, break opening genesis and genesis related checks into a separate
function.
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