-
Notifications
You must be signed in to change notification settings - Fork 29
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
STREAM-1500: throttle tx sending #167
Conversation
responses.push( | ||
...(await Promise.allSettled([ | ||
sendAndConfirmStreamRawTransaction(this.connection, batchTx, { hash, context }), | ||
executeTransaction(this.connection, batchTx.tx, { hash, context }, { sendRate }), | ||
])), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not executeMultipleTransactions
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we can't, please check comments right on top of this if.
preflightCommitment: commitment, | ||
skipPreflight: true, | ||
}); | ||
await sendThrottler.add(async () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required for us to have global-like queue so we don't hit RPCs limit across several invocations of send...
APi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be handled on the client-side, like FE should have this throttler and pass it to methods. But not in the sdk I think.
createMjultiple