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

ethereum-forks: add unit tests for ForkCondition #10707

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

tcoratger
Copy link
Contributor

This part has some logic elements so I think it doesn't hurt to add some simple tests to cover all that.

@mattsse mattsse added the C-test A change that impacts how or what we test label Sep 5, 2024
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

The new tests are good, but it does seem like we need to clarify how fork_block on TTD works.

fork_block only exists for sepolia and holesky, where the fork_block is higher than the actual merge block. For example on sepolia the fork_block is 1735371, but the TTD was reached earlier.

Essentially, when active_at_head is called, if either the TTD is higher or fork block are active, it should return true.

crates/ethereum-forks/src/forkcondition.rs Outdated Show resolved Hide resolved
crates/ethereum-forks/src/forkcondition.rs Outdated Show resolved Hide resolved
crates/ethereum-forks/src/forkcondition.rs Outdated Show resolved Hide resolved
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

nice, thanks!

@Rjected Rjected added this pull request to the merge queue Sep 5, 2024
Merged via the queue into paradigmxyz:main with commit 7fd1691 Sep 5, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants