Skip to content

Commit

Permalink
Remove redundant can_init() check from TXCREATE
Browse files Browse the repository at this point in the history
The check is now part of validation when ContainerKind::initcode is requested. For creation transaction this is still required to be checked before validation to find out container/input data split.
  • Loading branch information
gumb0 committed Jun 6, 2024
1 parent 15b8534 commit 783757c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/evmone/instructions_calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,6 @@ Result create_eof_impl(
const auto error_subcont = validate_eof(state.rev, ContainerKind::initcode, initcontainer);
if (error_subcont != EOFValidationError::success)
return {EVMC_SUCCESS, gas_left}; // "Light" failure.

const auto initcontainer_header = read_valid_eof1_header(initcontainer);
if (!initcontainer_header.can_init(initcontainer.size()))
return {EVMC_SUCCESS, gas_left}; // "Light" failure.
}

evmc_message msg{.kind = to_call_kind(Op)};
Expand Down

0 comments on commit 783757c

Please sign in to comment.