Skip to content

Conversation

@KolbyML
Copy link
Member

@KolbyML KolbyML commented Dec 1, 2025

There is no case where a transactionIndex can or should be negative.

TransactionIndex either uses uint or uint64 depending on the struct, so I don't think we be casting uint's to int, when calling MarshalReceipt()

I think using uint64 in MarshalReceipt() for txIndex's would be nice, but Receipt.TransactionIndex uses uint.

GetCanonicalTransaction() returns a uint64.

Imho Receipt.TransactionIndex should be using uint64, but assuming 32 bit is dead, which a lot of codebases assume, I guess it is fine. I am not aware of the full context, so I will leave that there

@KolbyML KolbyML changed the title eth/internal: MarshalReceipt use uint for txIndex eth: MarshalReceipt use uint for txIndex Dec 1, 2025
@gballet
Copy link
Member

gballet commented Dec 5, 2025

Hi, thanks a lot for your contribution! 🙏
At the moment, the go-ethereum team is overloaded with pull requests and in order to ensure we can give high quality review and attention to critical changes, we are not accepting refactoring-only PRs or minor upgrades.

We really appreciate the effort and encourage you to keep contributing, but for now we need to focus our limited review bandwidth on feature work, bug fixes, and protocol changes.

Thanks for understanding!

@gballet gballet closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants