EVMHost: properly populate implicit access list for Berlin

This commit is contained in:
Alex Beregszaszi 2021-04-26 14:05:04 +01:00 committed by Daniel Kirchner
parent 5bfd26287c
commit c66c5c9f1d

View File

@ -275,6 +275,14 @@ evmc::result EVMHost::call(evmc_message const& _message) noexcept
destination.balance = convertToEVMC(u256(convertFromEVMC(destination.balance)) + value);
}
// Populate the access access list.
// Note, this will also properly touch the created address.
// TODO: support a user supplied access list too
if (m_evmRevision >= EVMC_BERLIN)
{
access_account(message.sender);
access_account(message.destination);
}
evmc::address currentAddress = m_currentAddress;
m_currentAddress = message.destination;
evmc::result result = m_vm.execute(*this, m_evmRevision, message, code.data(), code.size());