mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Null gas in case of out-of-gas exception [Delivers #81118624]
This commit is contained in:
parent
54c636a376
commit
170ca152a4
1 changed files with 2 additions and 1 deletions
|
|
@ -114,7 +114,8 @@ int ExecutionEngine::run(std::unique_ptr<llvm::Module> _module, u256& _gas, ExtV
|
||||||
else
|
else
|
||||||
returnCode = static_cast<ReturnCode>(r);
|
returnCode = static_cast<ReturnCode>(r);
|
||||||
|
|
||||||
_gas = Runtime::getGas();
|
// Return remaining gas
|
||||||
|
_gas = returnCode == ReturnCode::OutOfGas ? 0 : Runtime::getGas();
|
||||||
|
|
||||||
if (returnCode == ReturnCode::Return)
|
if (returnCode == ReturnCode::Return)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue