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

Standardize api.Height handling #3552

Merged

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

By convention, to approximate the behavior of Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op.

ref: https://pkg.go.dev/encoding/json#Unmarshaler

How this works

If null is passed in, then we return immediately.

How this was tested

This changed all of the existing ad-hoc tests into test vectors which (I think) are easier to see what exactly the expected behavior is (and what is being tested)

Need to be documented in RELEASES.md?

No

Copy link
Contributor

@iansuvak iansuvak left a comment

Choose a reason for hiding this comment

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

Thank you for the standardization fix and test improvements. I'll do vectorized tests from now on.

@StephenButtolph StephenButtolph merged commit 0a90166 into get-validators-at-json-fix Nov 18, 2024
21 checks passed
@StephenButtolph StephenButtolph deleted the get-validators-at-json-fix-cleanup branch November 18, 2024 14:16
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