Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit d90d3f5

Browse files
committed
Fix delegate calls to precompiles and gas calculation in case of error
1 parent 69c0b95 commit d90d3f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libethereum/Executive.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ bool Executive::call(CallParameters const& _p, u256 const& _gasPrice, Address co
189189

190190
try
191191
{
192-
m_gas = _p.gas;
193-
192+
auto gas = _p.gas;
194193
auto const& schedule = m_sealEngine.evmSchedule(m_envInfo.number());
195194
bool const isCreate = false;
196-
m_output = precompilesVM->exec(m_gas, _p.receiveAddress, _p.senderAddress,
195+
m_output = precompilesVM->exec(gas, _p.codeAddress, _p.senderAddress,
197196
_p.apparentValue, _p.data, m_depth, isCreate, _p.staticCall, schedule);
197+
m_gas = gas;
198198
}
199199
catch (OutOfGas const&)
200200
{

0 commit comments

Comments
 (0)