mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Improve the application of EIP150 for create2
When EIP150 is enabled, gas constraints on sub contracts are only applied. This fix is to ensure consistency with create and to correctly interpret EIP150
This commit is contained in:
parent
8c5576b1ac
commit
fd37a18347
1 changed files with 3 additions and 1 deletions
|
|
@ -628,7 +628,9 @@ func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
|
||||||
gas = scope.Contract.Gas
|
gas = scope.Contract.Gas
|
||||||
)
|
)
|
||||||
// Apply EIP150
|
// Apply EIP150
|
||||||
|
if interpreter.evm.chainRules.IsEIP150 {
|
||||||
gas -= gas / 64
|
gas -= gas / 64
|
||||||
|
}
|
||||||
scope.Contract.UseGas(gas, interpreter.evm.Config.Tracer, tracing.GasChangeCallContractCreation2)
|
scope.Contract.UseGas(gas, interpreter.evm.Config.Tracer, tracing.GasChangeCallContractCreation2)
|
||||||
// reuse size int for stackvalue
|
// reuse size int for stackvalue
|
||||||
stackvalue := size
|
stackvalue := size
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue