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

adds support for fetching account tx by range #5694

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

hughy
Copy link
Contributor

@hughy hughy commented Dec 11, 2024

Summary

adds optional startSequence and endSequence request parameters to the 'wallet/getAccountTransactions' RPC to support fetching transactions by a range of block sequences (inclusive)

if startSequence is set but not endSequence, then all the maximum 32-bit integer value is used for endSequence

if endSequence is set but not startSequence, then the genesis block sequence (1) is used for startSequence

Testing Plan

adds unit test

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.

[X] Yes

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.

[ ] Yes

adds optional startSequence and endSequence request parameters to the
'wallet/getAccountTransactions' RPC to support fetching transactions by a range
of block sequences (inclusive)

if startSequence is set but not endSequence, then all the maximum 32-bit integer
value is used for endSequence

if endSequence is set but not startSequence, then the genesis block sequence (1)
is used for startSequence
@hughy hughy requested a review from a team as a code owner December 11, 2024 23:15
request.data.endSequence,
)
} else if (request.data.sequence) {
transactions = account.getTransactionsBySequence(request.data.sequence)
Copy link
Contributor

@NullSoldier NullSoldier Dec 11, 2024

Choose a reason for hiding this comment

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

I'm guessing we can just delete this in the future assuming getTransactionsBySequenceRange is inclusive which it looks like it is. Don't do this in this PR, it's just a thought when we start deprecating code in the RPC layer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is inclusive, so we can delete getTransactionsBySequence

@hughy hughy merged commit 2da3bca into staging Dec 16, 2024
13 checks passed
@hughy hughy deleted the feat/hughy/get-account-tx-seq-range branch December 16, 2024 22:34
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