Skip to content

Commit

Permalink
cleanup from review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shemnon committed Sep 16, 2024
1 parent c7efbf4 commit 12bcb49
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) {
// invalid, the tx is considered valid (so update nonce), but
// is to be treated as an exceptional abort (so burn all gas).
if errors.Is(vmerr, vm.ErrInvalidEOFInitcode) {
//st.gasRemaining = 0
st.state.SetNonce(msg.From, st.state.GetNonce(sender.Address())+1)
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion core/vm/eips.go
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ func opExtCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
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()
} else if err != nil {
temp.SetUint64(2)
Expand Down
1 change: 0 additions & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,6 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
// Reject code starting with 0xEF if EIP-3541 is enabled.
if err == nil && len(ret) >= 1 && HasEOFByte(ret) {
if evm.chainRules.IsPrague && isInitcodeEOF {
fmt.Printf("FIXME - valid EOF deployment\n")
// Don't reject EOF contracts after Shanghai
} else if evm.chainRules.IsLondon {
err = ErrInvalidCode
Expand Down

0 comments on commit 12bcb49

Please sign in to comment.