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

Use Marshal and UnmarshalJSON for HexBytes #239

Merged
merged 9 commits into from
Jul 29, 2024
Merged

Conversation

jewei1997
Copy link
Contributor

@jewei1997 jewei1997 commented Jul 12, 2024

Describe your changes and provide context

Use MarshalJSON and UnMarshalJSON for HexBytes. This PR may have wide-ranging consequences, so it is best to treat this as an app-hash breaking change.

Testing performed to validate your change

existing unit tests.

@@ -69,3 +69,24 @@ func (bz HexBytes) Format(s fmt.State, verb rune) {
s.Write([]byte(fmt.Sprintf("%X", []byte(bz))))
}
}

func (bz HexBytes) MarshalJSON() ([]byte, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should treat this as an app-hash breaking change due to potentially wide-ranging impact.

@jewei1997 jewei1997 changed the title Genesis export OOM Use Marshal and UnmarshalJSON for HexBytes Jul 22, 2024
libs/bytes/bytes.go Show resolved Hide resolved
@jewei1997 jewei1997 merged commit 784a8e0 into main Jul 29, 2024
22 checks passed
@jewei1997 jewei1997 deleted the genesis-export-oom branch July 29, 2024 19:08
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