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

C++: Add convenient result constructors #660

Merged
merged 2 commits into from
Aug 10, 2022
Merged

C++: Add convenient result constructors #660

merged 2 commits into from
Aug 10, 2022

Conversation

chfast
Copy link
Member

@chfast chfast commented Aug 3, 2022

New constructors are added based on the usage in state transition implementation in evmone.

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #660 (ff084c7) into master (4404c62) will decrease coverage by 0.02%.
The diff coverage is 42.85%.

@@            Coverage Diff             @@
##           master     #660      +/-   ##
==========================================
- Coverage   93.05%   93.02%   -0.03%     
==========================================
  Files          25       25              
  Lines        3655     3657       +2     
  Branches      379      379              
==========================================
+ Hits         3401     3402       +1     
- Misses        144      145       +1     
  Partials      110      110              

///
/// @param _status_code The status code.
/// @param _gas_left The amount of gas left.
/// @param _create_address The address of the possibly created account. This can be valid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the address valid in creation failure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check now.

* (evmc_result::status_code is ::EVMC_SUCCESS).
* The create address may be provided even though the contract creation has failed
* (evmc_result::status_code is not ::EVMC_SUCCESS). This is useful in situations
* when the address is observable, e.g. access to it remains warm.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, in what case does the address remain warm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In most cases of failing contact creation, but not all. Obviously.

@chfast chfast merged commit 2e31166 into master Aug 10, 2022
@chfast chfast deleted the cpp_result branch August 10, 2022 13:13
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.

3 participants