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

Commit

Permalink
Fix returning out of gas
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Dec 23, 2019
1 parent d90d3f5 commit 97200a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libaleth-precompiles/PrecompilesVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ evmc_result execute(evmc_vm*, const evmc_host_interface*, evmc_host_context*,
auto const gasCost = precompile.first(input, _rev);
auto const gasLeft = _msg->gas - gasCost;
if (gasLeft < 0)
return evmc::make_result(EVMC_SUCCESS, 0, nullptr, 0);
return evmc::make_result(EVMC_OUT_OF_GAS, 0, nullptr, 0);

// Execute.
auto const res = precompile.second(input);
Expand Down

0 comments on commit 97200a7

Please sign in to comment.