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

feat(connection.ts): implement getTransactions #23633

Merged
merged 1 commit into from Apr 25, 2022

Conversation

gebob19
Copy link
Contributor

@gebob19 gebob19 commented Mar 13, 2022

implement getTransactions which retrieves multiple transaction responses in a single RPC call

Problem

currently getParsedConfirmedTransactions is the only method which lets you retrieve multiple txs in a single call, however the ParsedTransactionWithMeta structure is different from a TransactionResponse structure

Summary of Changes

implement getTransactions which retrieves multiple transaction responses in a single RPC call

Fixes #

implement getTransactions which retrieves multiple transaction responses in a single RPC call
@mergify mergify bot added the community Community contribution label Mar 13, 2022
@mergify mergify bot requested a review from a team March 13, 2022 16:56
@stale
Copy link

stale bot commented Apr 16, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Apr 16, 2022
@stale
Copy link

stale bot commented Apr 25, 2022

This stale pull request has been automatically closed. Thank you for your contributions.

@jstarry jstarry merged commit 0b93de9 into solana-labs:master Apr 25, 2022
});

const unsafeRes = await this._rpcBatchRequest(batch);
const res = unsafeRes.map((unsafeRes: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Somehow, the type of res here is any, despite TypeScript knowing the type of res.result.

image

Fixed in #26099.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this is because both variables are named the same, and one shadows the other.

Copy link
Contributor

Choose a reason for hiding this comment

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

If true, we should definitely install the no-shadow linter. https://eslint.org/docs/rules/no-shadow

Copy link
Contributor

Choose a reason for hiding this comment

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

I figured out why this happened. We had insufficient type coverage here, so you missed this error. #26102

jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
implement getTransactions which retrieves multiple transaction responses in a single RPC call

Co-authored-by: obiwan <you@example.com>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
implement getTransactions which retrieves multiple transaction responses in a single RPC call

Co-authored-by: obiwan <you@example.com>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
implement getTransactions which retrieves multiple transaction responses in a single RPC call

Co-authored-by: obiwan <you@example.com>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
implement getTransactions which retrieves multiple transaction responses in a single RPC call

Co-authored-by: obiwan <you@example.com>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 30, 2022
implement getTransactions which retrieves multiple transaction responses in a single RPC call

Co-authored-by: obiwan <you@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants