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

Convert ZeroWei to a func (avoid shared pointer) #14043

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

kasey
Copy link
Contributor

@kasey kasey commented May 23, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

Well this isn't a bug yet but it probably would be someday. I defined a package var for ZeroWei to serve in places where we need a default value for a primitives.Wei which is an alias for a *big.Int, but since this is a reference type it seems dangerous to share a pointer value that something could accidentally mutate. So this simple PR converts that value to a func.

@kasey kasey requested a review from a team as a code owner May 23, 2024 12:12
@kasey kasey changed the title convert ZeroWei to a func to avoid shared pointer convert ZeroWei to a func (avoid shared pointer) May 23, 2024
@kasey kasey changed the title convert ZeroWei to a func (avoid shared pointer) Convert ZeroWei to a func (avoid shared pointer) May 23, 2024
@kasey kasey enabled auto-merge May 23, 2024 14:38
@kasey kasey added this pull request to the merge queue May 23, 2024
Merged via the queue into develop with commit b04baa9 May 23, 2024
17 checks passed
@kasey kasey deleted the zero-wei-func branch May 23, 2024 15:37
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