-
Notifications
You must be signed in to change notification settings - Fork 24
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
Optimize WaitForTransaction #132
Conversation
QuestionI'm not entirely sure how the server-side behavior of wait_by_hash works. |
The TS SDK has this implementation. You'll want to call "wait_by_hash" first, and follow it up with the shorter calls. The Tl;dr is that wait by hash will keep a connection open for that time, and really is not necessary after the first one. It's better from a long term to call the TransactionByHash call. |
Fixed the test-related issues. Comparing error message strings is not a recommended approach for error handling, so I believe that once an API Error Type is implemented in the future, can add additional handling. |
…ectly calling WaitTransactionByHash
…ction
thx, greg |
Description
Adopt the WaitForTransaction polling method implemented via wait_by_hash api in the Typescript SDK.
However, there is a concern that this might conflict with the PR using Golang context for HTTP requests.
In that case, a ctx should be accepted and used for polling.
Test Plan
Related Links