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

refactor: use the submit_and_await_commit API #1180

Closed
iqdecay opened this issue Oct 31, 2023 · 0 comments · Fixed by #1187
Closed

refactor: use the submit_and_await_commit API #1180

iqdecay opened this issue Oct 31, 2023 · 0 comments · Fixed by #1187
Assignees

Comments

@iqdecay
Copy link
Contributor

iqdecay commented Oct 31, 2023

While exploring #1135, we realised that there is an issue where we don't call the submit_and_await_commit fuel-core API, but rather first submit, then await for commit (see provider.rs l189).
This can create issues where the tx id returned is not synchronized properly.
This needs to be refactored, but first we need a unified TxStatus type as raised in #1179.

@iqdecay iqdecay self-assigned this Oct 31, 2023
@iqdecay iqdecay changed the title refactor: use the ` refactor: use the submit_and_await_commit API Oct 31, 2023
iqdecay added a commit that referenced this issue Jan 8, 2024
Closes #1180,  #1128.
This PR uses the correct API for sending a transaction and ensuring that
we wait for the commit of the transaction before returning.
This is needed because otherwise there might be a disconnect between
submitting the transaction and awaiting for its commit, if it is done
using the two separate APIs as before.

BREAKING CHANGE: 
- `send_transaction_and_await_commit` function now returns a `TxStatus`
instead of `TxId`.

---------

Co-authored-by: MujkicA <[email protected]>
Co-authored-by: hal3e <[email protected]>
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 a pull request may close this issue.

1 participant