Skip to content

chore: fix confusing comment in E2HSManager #1857

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

Merged
merged 2 commits into from
May 25, 2025

Conversation

KolbyML
Copy link
Member

@KolbyML KolbyML commented May 25, 2025

What was wrong?

There was some confusion on a confusing comment #1855 (comment)

How was it fixed?

Updating the comment to be more accuate

Copy link
Collaborator

@morph-dev morph-dev 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 followup :shipit:

@@ -60,7 +60,7 @@ impl E2HSManager {

pub async fn last_fetched_block(&self) -> anyhow::Result<&ProcessedBlock> {
let Some(current_e2hs) = &self.current_e2hs else {
panic!("current_e2hs should always be present, perhaps it wasn't initialized in E2HSManager::new()?");
bail!("No blocks were fetched yet, current_e2hs is initialized in get_next_block");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
bail!("No blocks were fetched yet, current_e2hs is initialized in get_next_block");
bail!("No blocks were fetched yet, last_fetched_block is available only after successful get_next_block");

nit: I would phrase it like this. Up to you.

@KolbyML KolbyML merged commit 022a646 into ethereum:master May 25, 2025
16 checks passed
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