Skip to content

Reduce ForkName boilerplate in fork-context #6933

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 1 commit into from
Feb 7, 2025

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented Feb 6, 2025

Issue Addressed

Noted that there's a bit of fork boiler plate in fork context.

Proposed Changes

If we list a mapping of ForkName -> fork_version in the ForkName enum we can get rid of it :)

Not much, but should make the next fork a tiny tit less annoying

@dapplion dapplion requested a review from macladson February 6, 2025 22:46
@dapplion dapplion added the ready-for-review The code is ready for review label Feb 6, 2025
Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

LGTM

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Feb 7, 2025
Copy link

mergify bot commented Feb 7, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@michaelsproul
Copy link
Member

@mergifgy requeue

@michaelsproul
Copy link
Member

@mergify requeue

Copy link

mergify bot commented Feb 7, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

mergify bot added a commit that referenced this pull request Feb 7, 2025
@mergify mergify bot merged commit 59afe41 into sigp:unstable Feb 7, 2025
30 of 31 checks passed
@dapplion dapplion deleted the forkname-boilerplate branch February 7, 2025 22:15
mergify bot pushed a commit that referenced this pull request Feb 8, 2025
This PR adds an implementation to get fork_version and fork_epoch given a `ForkName`. I didn't realize that this is already implemented in the `ChainSpec` sorry

- #6933


  Remove duplicated fork_epoch and fork_version implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants