Skip to content

Remove forkchoice dependency from stategen - #17344

Open
syjn99 wants to merge 1 commit into
developfrom
refactor/remove-stategen-forkchoice
Open

Remove forkchoice dependency from stategen#17344
syjn99 wants to merge 1 commit into
developfrom
refactor/remove-stategen-forkchoice

Conversation

@syjn99

@syjn99 syjn99 commented Aug 13, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

Other

What does this PR do? Why is it needed?

  1. State struct inside stategen package holds fc (ForkChoicer) but it is actually a dead field.
  1. fc is only useful as an argument to register a handler, which can also be done outside of stategen.New(..).

With stategen.New(..) has fc in its function signature, we need to import doubly-linked-tree package in every test functions, mostly putting an empty forkchoice tree.

This PR removes the dead field (fc) and moves the handler registration in startStateGen.

Which issue(s) does this PR fix?

N/A

Other notes for review

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have included a uniquely named changelog fragment file.
  • I have added a description with sufficient context for reviewers to understand this PR.
  • I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable).

@syjn99 syjn99 added the cleanup PR improving code health label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup PR improving code health

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant