-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix: TransactionStatus::status should not be waiting for Final #379
Conversation
.worker | ||
.client() | ||
.tx_async_status( | ||
&self.sender_id, | ||
near_primitives::hash::CryptoHash(self.hash.0), | ||
near_primitives::views::TxExecutionStatus::Final, | ||
TxExecutionStatus::Included, |
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.
Indeed, final is not needed, but looking at the implementation, it feels that you actually need ExecutedOptimistic since the function needs to return the transaction outcome, right?
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.
nah, this is just polling the transaction status, so ExecutedOptimistic would have the transaction already be slightly completed. This function should just be returning immediately where ExecutedOptimistic would take some time to resolve
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.
Ah, I misinterpreted Poll<>
part in the function signature. I thought about it as part of the native Rust futures polling, but it is not.
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.
@race-of-sloths score 3
@frol Thank you for calling! @ChaoticTempest Thank you for the contribution! Join Race of Sloths by simply mentioning me in your comment/PRs description and start collecting Sloth Points through contributions to open source projects. What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
## 🤖 New release * `near-workspaces`: 0.14.0 -> 0.14.1 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.14.1](near-workspaces-v0.14.0...near-workspaces-v0.14.1) - 2024-10-18 ### Fixed - TransactionStatus::status should not be waiting for Final ([#379](#379)) ### Other - fix clippy 1.82 (doc preambles) ([#381](#381)) - bump cargo-near-build to 0.2.0 ([#380](#380)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/).
The
TransactionStatus::status
call should not be waiting forFinal
inclusion of the transaction as it is supposed to only be checking the status of the transaction on chain and not wait for it to completely complete. Also, this does not take away any feature asTransactionStatus::wait
already does the full wait