mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Prevent usage of create to avoid EOA nonce to change by more than one.
This commit is contained in:
parent
926104ecdc
commit
aea7e6f069
1 changed files with 5 additions and 0 deletions
|
|
@ -578,6 +578,11 @@ func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte
|
|||
}
|
||||
|
||||
func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
|
||||
if interpreter.evm.TxContext.Is5806 {
|
||||
if scope.Contract.CodeHash == types.EmptyCodeHash || scope.Contract.CodeHash == (common.Hash{}) {
|
||||
return nil, ErrEip5806Write
|
||||
}
|
||||
}
|
||||
if interpreter.readOnly {
|
||||
return nil, ErrWriteProtection
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue