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

propagate revert data when external call fails #2531

Merged
merged 4 commits into from
Nov 9, 2021

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Nov 9, 2021

What I did

Fix #2529

How I did it

Change straight assert (call ...) to

if !(call ...) (seq
(returndatacopy 0 0 returndatasize)
(revert 0 returndatasize)
))

How to verify it

Check out tests

Description for the changelog

Propagate revert data when external call fails

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2021

Codecov Report

Merging #2531 (b9e1dbc) into master (9a5dd50) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2531   +/-   ##
=======================================
  Coverage   84.67%   84.68%           
=======================================
  Files          93       93           
  Lines        9301     9306    +5     
  Branches     2096     2096           
=======================================
+ Hits         7876     7881    +5     
  Misses        940      940           
  Partials      485      485           
Impacted Files Coverage Δ
vyper/builtin_functions/functions.py 88.62% <100.00%> (ø)
vyper/old_codegen/external_call.py 94.33% <100.00%> (ø)
vyper/old_codegen/parser_utils.py 83.01% <100.00%> (+0.23%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a5dd50...b9e1dbc. Read the comment docs.

@charles-cooper charles-cooper marked this pull request as ready for review November 9, 2021 17:17
@charles-cooper charles-cooper merged commit f543572 into vyperlang:master Nov 9, 2021
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.

Revert messages in raise or assert are not properly propagated when the exception is rethrown by the caller
3 participants