Skip to content

Commit

Permalink
rebase evmone
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Nov 7, 2024
1 parent 2ae27d9 commit 1acfb21
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion silkworm/core/execution/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re
StateView sv{state_};
BlockHashProvider bhp{evm_};

const auto e1_receipt = evmone::state::transition(sv, e1_block_, bhp, e1_tx, evm_.revision(), evm_.vm());
const auto rev = evm_.revision();
const intx::uint128 g0{protocol::intrinsic_gas(txn, rev)};
SILKWORM_ASSERT(g0 <= INT64_MAX); // true due to the precondition (transaction must be valid)
const auto execution_gas_limit = e1_tx.gas_limit - static_cast<int64_t>(g0);

const auto e1_receipt = evmone::state::transition(sv, e1_block_, bhp, e1_tx, rev, evm_.vm(), execution_gas_limit);
const auto gas_used = static_cast<uint64_t>(e1_receipt.gas_used);

// Optimization: since receipt.logs might have some capacity, let's reuse it.
Expand Down

0 comments on commit 1acfb21

Please sign in to comment.