Skip to content

Commit

Permalink
fix test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2022da committed Mar 13, 2024
1 parent ae33548 commit 1b1e433
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"bytes"
"encoding/json"
"fmt"
"github.com/ethereum/go-ethereum/cmd/evm/internal/compiler"
compiler2 "github.com/ethereum/go-ethereum/core/opcodeCompiler/compiler"
"io"
"math/big"
Expand Down
2 changes: 1 addition & 1 deletion core/opcodeCompiler/compiler/opcodeProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TryGenerateOptimizedCode(address common.Address, code []byte) (OptCode, boo
}

func DeleteCodeCache(addr common.Address) {
if enabled {
if !enabled {
return
}
// flush in case there are invalid cached code
Expand Down
2 changes: 2 additions & 0 deletions core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package state
import (
"bytes"
"fmt"
"github.com/ethereum/go-ethereum/core/opcodeCompiler/compiler"
"io"
"math/big"
"sync"
Expand Down Expand Up @@ -514,6 +515,7 @@ func (s *stateObject) setCode(codeHash common.Hash, code []byte) {
s.code = code
s.data.CodeHash = codeHash[:]
s.dirtyCode = true
compiler.GenOrLoadOptimizedCode(s.address, s.code)
}

func (s *stateObject) SetNonce(nonce uint64) {
Expand Down

0 comments on commit 1b1e433

Please sign in to comment.