Skip to content
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

core/types: unify with NumberU64() #30510

Closed
wants to merge 1 commit into from

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Sep 25, 2024

I often see diff like this:

image

where the variable type is changed from *types.Block to *types.Header, but the former has the NumberU64() function, while the later doesn't.

This PR makes such diffs gone by also providing a NumberU64() function to the later.

@karalabe
Copy link
Member

karalabe commented Sep 25, 2024 via email

@zhiqiangxu
Copy link
Contributor Author

zhiqiangxu commented Sep 26, 2024

Here're my two cents:

It's just a simple getter, which can unify the way to get block number as uint64. And it also makes code shorter, which is good for reader.

@holiman
Copy link
Contributor

holiman commented Sep 26, 2024

I agree with @karalabe , but thanks for the effort

@holiman holiman closed this Sep 26, 2024
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.

3 participants