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

Fix a bug where transfer sui with insufficient gas still lead the object to be transferred #3675

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Aug 1, 2022

When there is an error due to insufficient gas, we clear the temporary store.
However, in code latter we deduct and update gas on the old object before we cleared the temporary store, and write it into the store. This essentially override the cleared state.
This part of the code is not very clean and probably worth some refactoring to make it less error prone.
This PR resolves #3632.

@lxfind lxfind force-pushed the transfer-sui-fix-insufficient-gas-bug branch from 23dfd39 to 0a77bc7 Compare August 1, 2022 18:46
@lxfind lxfind enabled auto-merge (squash) August 1, 2022 18:46
@lxfind lxfind merged commit 8d457fb into main Aug 1, 2022
@lxfind lxfind deleted the transfer-sui-fix-insufficient-gas-bug branch August 1, 2022 18:59
huitseeker pushed a commit to huitseeker/sui that referenced this pull request Aug 1, 2022
…ect to be transferred (MystenLabs#3675)

* Add tests

* Fix insuffiicent gas bug
huitseeker pushed a commit that referenced this pull request Aug 1, 2022
…ect to be transferred (#3675)

* Add tests

* Fix insuffiicent gas bug
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 this pull request may close these issues.

Sui Object transferred even when there is insufficient gas
2 participants