ethereum / evmone

Fast Ethereum Virtual Machine implementation
Apache License 2.0
865 stars 287 forks source link

state: Refactor `Host::create()` #881

Closed chfast closed 7 months ago

chfast commented 7 months ago

Don't look up the new account 3x in Host::create(), add helper function is_create_collision().

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.50%. Comparing base (962d2bb) to head (9fbb408).

:exclamation: Current head 9fbb408 differs from pull request most recent head 77ffdec. Consider uploading reports for the commit 77ffdec to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #881 +/- ## ======================================= Coverage 98.50% 98.50% ======================================= Files 130 130 Lines 15615 15619 +4 ======================================= + Hits 15382 15386 +4 Misses 233 233 ``` | [Flag](https://app.codecov.io/gh/ethereum/evmone/pull/881/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [ethereum-tests](https://app.codecov.io/gh/ethereum/evmone/pull/881/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `27.69% <100.00%> (+0.02%)` | :arrow_up: | | [ethereum-tests-silkpre](https://app.codecov.io/gh/ethereum/evmone/pull/881/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `18.81% <100.00%> (+0.02%)` | :arrow_up: | | [execution-spec-tests](https://app.codecov.io/gh/ethereum/evmone/pull/881/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `19.04% <100.00%> (+0.02%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/ethereum/evmone/pull/881/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | `94.35% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/ethereum/evmone/pull/881?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum) | Coverage Δ | | |---|---|---| | [test/state/host.cpp](https://app.codecov.io/gh/ethereum/evmone/pull/881?src=pr&el=tree&filepath=test%2Fstate%2Fhost.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#diff-dGVzdC9zdGF0ZS9ob3N0LmNwcA==) | `98.18% <100.00%> (+0.02%)` | :arrow_up: |