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

Test BinarySerializer and BinaryParser when XRP value is negative #609

Open
sappenin opened this issue Mar 17, 2025 · 0 comments
Open

Test BinarySerializer and BinaryParser when XRP value is negative #609

sappenin opened this issue Mar 17, 2025 · 0 comments

Comments

@sappenin
Copy link
Collaborator

sappenin commented Mar 17, 2025

In theory, binary-encoded XRP values should never be negative. However, stranger things have occurred and sometimes rippled RPC endpoints return negative values even though they shouldn't. We should augment the BaseSerializerTypeTest and it's associated data-driven-tests.json test-cases to include a few negative XRP values, like -0, -1 and something else (e.g., -100).

Depending on what is decided, we'll likely need to update AmountType#fromJson where it checks for a negative value.

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

No branches or pull requests

1 participant