Skip to content

Commit

Permalink
legacy precompile gas fix
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush committed Jan 13, 2025
1 parent a8ffd92 commit d10c4a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libevm/legacy/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c PrecompiledStatefulContract) Upgrade() vm.PrecompiledStatefulContract {
return func(env vm.PrecompileEnvironment, input []byte) ([]byte, error) {
gas := env.Gas()
ret, remainingGas, err := c(env, input, gas)
if used := gas - remainingGas; used < gas {
if used := gas - remainingGas; used <= gas {
env.UseGas(used)
}
return ret, err
Expand Down

0 comments on commit d10c4a3

Please sign in to comment.