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

account.test - getTransactionsByTime: added buffer comparison to sort #5709

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

j-s-n
Copy link
Contributor

@j-s-n j-s-n commented Jan 21, 2025

Summary

Original test was lexicographically sorting the hashed transactions, which could misorder the transactions based on their string representations. Added in sorting based on the buffer compare method to compare the bytes

Testing Plan

Deleted and regenerated account.test.fixture and reran test 10 times.
Staging - failed
account.test - 10/10 passed

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.
No

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.
No

@j-s-n j-s-n requested a review from a team as a code owner January 21, 2025 23:52
@j-s-n j-s-n changed the title added buffer comparison into sort for getTransactionsByTime account.test - getTransactionsByTime: added buffer comparison to sort Jan 21, 2025
@hughy hughy self-requested a review January 22, 2025 00:18
Copy link
Contributor

@hughy hughy left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I think the comments above the changed lines about the sorting are incorrect

nvm, I misread!

@j-s-n
Copy link
Contributor Author

j-s-n commented Jan 22, 2025

Looks good to me, but I think the comments above the changed lines about the sorting are incorrect

reverse is sorting by b compare a and chron sort is a compare b

@dguenther dguenther merged commit 500a87f into iron-fish:staging Jan 23, 2025
15 checks passed
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