Skip to content

Commit

Permalink
Rebase fix
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Feb 20, 2023
1 parent d573f5d commit 8b9d270
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/evmone/baseline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ evmc_result execute(const VM& vm, ExecutionState& state, const CodeAnalysis& ana
evmc_result execute(evmc_vm* c_vm, const evmc_host_interface* host, evmc_host_context* ctx,
evmc_revision rev, const evmc_message* msg, const uint8_t* code, size_t code_size) noexcept
{
if (rev >= EVMC_CANCUN && is_eof_code({code, code_size}))
if (rev >= EVMC_CANCUN && is_eof_container({code, code_size}))
{
// TODO(EOF): The initcode must be validated. Doing this just before execution is
// good because validation can be combined with analysis/loading. But consider also
Expand Down
4 changes: 2 additions & 2 deletions lib/evmone/instructions_calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ evmc_status_code create_impl(StackTop stack, ExecutionState& state) noexcept
msg.input_size = init_code_size;
}

if (state.rev >= EVMC_CANCUN &&
(is_eof_code(state.original_code) || is_eof_code({msg.input_data, msg.input_size})))
if (state.rev >= EVMC_CANCUN && (is_eof_container(state.original_code) ||
is_eof_container({msg.input_data, msg.input_size})))
if (validate_eof(state.rev, {msg.input_data, msg.input_size}) !=
EOFValidationError::success)
return EVMC_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion test/state/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ std::variant<TransactionReceipt, std::error_code> transition(
auto is_valid_tx = true;
auto result = evmc::Result{};

if (rev >= EVMC_CANCUN && !tx.to.has_value() && is_eof_code(tx.data))
if (rev >= EVMC_CANCUN && !tx.to.has_value() && is_eof_container(tx.data))
is_valid_tx = (validate_eof(rev, tx.data) == evmone::EOFValidationError::success);

if (is_valid_tx)
Expand Down

0 comments on commit 8b9d270

Please sign in to comment.