Skip to content

Refactor code for readability #109

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

Conversation

Ayiga
Copy link
Member

@Ayiga Ayiga commented Apr 18, 2025

This PR:

Refactors the optimism_espresso_test_helpers.go file to help readability and maintainability

The code within the optimism_espresso_test_helpers.go file works without issue, but it can be difficult to follow due to being over a hundred lines and several indentation levels deep. This code has been split up into smaller functions that are more focused and feature additional comments to motivate and describe their actions.

This PR does not:

Modify the existing behavior, it should just move the logic and behavior into different functions to help readability and maintainability.

The code in the `optimism_test_helpers.go` works but a lot of it is
deeply nested and long which hurts readability.

This change refactors the code into smaller functions with reduced
indentation level, and more annotated comments to help
readability, maintainability, and clarity.
@Ayiga Ayiga force-pushed the ts/ref/cleanup-code-helpers-for-espresso-devnet branch from f60c191 to e9f217a Compare April 18, 2025 17:15
@philippecamacho
Copy link
Collaborator

Surprisingly enough the integration test fails for me:

> git log
commit e9f217ac132a209567c70e9f6d098cd9e2496367 (HEAD -> ts/ref/cleanup-code-helpers-for-espresso-devnet, origin/ts/ref/cleanup-code-helpers-for-espresso-devnet)
Author: Theodore Schnepper <[email protected]>
Date:   Fri Apr 18 11:07:46 2025 -0600

    Refactor code for readability
    
    The code in the `optimism_test_helpers.go` works but a lot of it is
    deeply nested and long which hurts readability.
    
    This change refactors the code into smaller functions with reduced
    indentation level, and more annotated comments to help
    readability, maintainability, and clarity.
> just espresso-tests
... (error see file attached)

tests.log

@Ayiga
Copy link
Member Author

Ayiga commented Apr 18, 2025

Interesting... Your error seems to be:

unable to determine the host for the espresso-dev-node sequencer api

Which means that we didn't populate your port remap at all. It looks like you're failing all of the e2e espresso dev node tests with the same error.

@QuentinI
Copy link
Collaborator

Rebased in #181

@QuentinI QuentinI closed this Jun 20, 2025
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.

3 participants