Skip to content

Add macro to simplify into_full_block implementations#9294

Open
macladson wants to merge 2 commits into
sigp:unstablefrom
macladson:full-block-macro
Open

Add macro to simplify into_full_block implementations#9294
macladson wants to merge 2 commits into
sigp:unstablefrom
macladson:full-block-macro

Conversation

@macladson
Copy link
Copy Markdown
Member

Proposed Changes

Use a macro to remove the repetitive fork variant boilerplate in signed_beacon_block.rs when implementing into_full_block for the various SignedBeaconBlock variants

@macladson macladson added code-quality ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! labels May 12, 2026
Copy link
Copy Markdown
Member

@chong-he chong-he left a comment

Choose a reason for hiding this comment

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

I understand what this PR is doing but I can't say I understand everything in the macro itself.

This is to use macro to replace the repeated into_full_block function for each fork, with a flexibility of having some extra fields in the body for some forks.

Nice simplification, looks good to me overall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants