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

Support height as a string in avm.getBlockByHeight #1437

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

In our APIs, we let callers specify numbers as strings or numbers because javascript represents all numbers as floating point (so the precision is only 2^53). So we allow users to specify numbers as strings to avoid any unintended rounding issues in javascript.

How this works

Using the json.Uint64 type as in other APIs.

How this was tested

CI

@StephenButtolph StephenButtolph self-assigned this Apr 27, 2023
@StephenButtolph StephenButtolph added bug Something isn't working vm This involves virtual machines labels Apr 27, 2023
@StephenButtolph StephenButtolph added this to the v1.10.1 milestone Apr 27, 2023
@StephenButtolph StephenButtolph merged commit 188049c into dev Apr 27, 2023
@StephenButtolph StephenButtolph deleted the support-string-ints-api branch April 27, 2023 19:54
joshua-kim pushed a commit to joshua-kim/avalanchego that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vm This involves virtual machines
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants