Skip to content

(refacto): replace block interface{} returns with BlockWithTsx/TxHashes#842

Open
waseemnaseeven wants to merge 1 commit into
NethermindEth:mainfrom
waseemnaseeven:main
Open

(refacto): replace block interface{} returns with BlockWithTsx/TxHashes#842
waseemnaseeven wants to merge 1 commit into
NethermindEth:mainfrom
waseemnaseeven:main

Conversation

@waseemnaseeven

Copy link
Copy Markdown
  • Added typed wrappers for block variants with transactions/hashes and updated the corresponding RPC methods to return these types.

  • Adapted the business logic (tip estimation and version detection) to explicitly handle confirmed and pre-confirmed outputs.

  • Updated the documentation and examples to reflect the new method signatures and the explicit selection of block variants.

@bimakw bimakw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice refactor! The typed wrapper approach is much cleaner than returning interface{}.

Observations:

  • Switch statement pattern for handling Block/PreConfirmed is consistent across files ✓
  • Docs updated properly ✓
  • Tests updated to use new wrapper types ✓

Minor: There's a small formatting issue in transaction_test.go:230 (extra indent after Return()).

Otherwise LGTM!

@thiagodeev

thiagodeev commented Jan 8, 2026

Copy link
Copy Markdown
Collaborator

Hey @waseemnaseeven! Thanks for your contribution.
Sorry, I'll take some time until I review yours and other PRs. We are completely focused on the next release

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants