mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
cleanup from review comments
This commit is contained in:
parent
c7efbf466e
commit
12bcb4929a
3 changed files with 1 additions and 3 deletions
|
|
@ -517,7 +517,6 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
|
||||||
// invalid, the tx is considered valid (so update nonce), but
|
// invalid, the tx is considered valid (so update nonce), but
|
||||||
// is to be treated as an exceptional abort (so burn all gas).
|
// is to be treated as an exceptional abort (so burn all gas).
|
||||||
if errors.Is(vmerr, vm.ErrInvalidEOFInitcode) {
|
if errors.Is(vmerr, vm.ErrInvalidEOFInitcode) {
|
||||||
//st.gasRemaining = 0
|
|
||||||
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1)
|
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1073,7 +1073,7 @@ func opExtCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
|
||||||
ret, returnGas, err = interpreter.evm.Call(scope.Contract, toAddr, args, gas, &value)
|
ret, returnGas, err = interpreter.evm.Call(scope.Contract, toAddr, args, gas, &value)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == ErrExecutionReverted || err == ErrInsufficientBalance || err == ErrDepth {
|
if errors.Is(err, ErrExecutionReverted) || errors.Is(err, ErrInsufficientBalance) || errors.Is(err, ErrDepth) {
|
||||||
temp.SetOne()
|
temp.SetOne()
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
temp.SetUint64(2)
|
temp.SetUint64(2)
|
||||||
|
|
|
||||||
|
|
@ -571,7 +571,6 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
|
||||||
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
||||||
if err == nil && len(ret) >= 1 && HasEOFByte(ret) {
|
if err == nil && len(ret) >= 1 && HasEOFByte(ret) {
|
||||||
if evm.chainRules.IsPrague && isInitcodeEOF {
|
if evm.chainRules.IsPrague && isInitcodeEOF {
|
||||||
fmt.Printf("FIXME - valid EOF deployment\n")
|
|
||||||
// Don't reject EOF contracts after Shanghai
|
// Don't reject EOF contracts after Shanghai
|
||||||
} else if evm.chainRules.IsLondon {
|
} else if evm.chainRules.IsLondon {
|
||||||
err = ErrInvalidCode
|
err = ErrInvalidCode
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue