Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2022da committed Mar 28, 2024
1 parent 743518c commit e71fbc0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions core/vm/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,17 +856,17 @@ func TestRuntimeJSTracer(t *testing.T) {
func TestRuntimeJSTracerWithOpcodeOptimizer(t *testing.T) {
jsTracers := []string{
`{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0,
step: function() { this.steps},
step: function() { this.steps++},
fault: function() {},
result: function() {
return [this.enters, this.exits,this.enterGas,this.gasUsed, this.steps].join(",")
},
enter: function(frame) {
this.enters;
this.enters++;
this.enterGas = frame.getGas();
},
exit: function(res) {
this.exits;
this.exits++;
this.gasUsed = res.getGasUsed();
}}`,
`{enters: 0, exits: 0, enterGas: 0, gasUsed: 0, steps:0,
Expand All @@ -875,11 +875,11 @@ func TestRuntimeJSTracerWithOpcodeOptimizer(t *testing.T) {
return [this.enters, this.exits,this.enterGas,this.gasUsed, this.steps].join(",")
},
enter: function(frame) {
this.enters;
this.enters++;
this.enterGas = frame.getGas();
},
exit: function(res) {
this.exits;
this.exits++;
this.gasUsed = res.getGasUsed();
}}`}
tests := []struct {
Expand Down
3 changes: 2 additions & 1 deletion tests/block_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ func (t *BlockTest) Run(snapshotter bool, scheme string, tracer vm.EVMLogger) er
cache.SnapshotWait = true
}
chain, err := core.NewBlockChain(db, cache, gspec, nil, engine, vm.Config{
Tracer: tracer,
Tracer: tracer,
EnableOpcodeOptimizations: false,
}, nil, nil)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion tests/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func runBenchmark(b *testing.B, t *StateTest) {
key := fmt.Sprintf("%s/%d", subtest.Fork, subtest.Index)

b.Run(key, func(b *testing.B) {
vmconfig := vm.Config{}
vmconfig := vm.Config{EnableOpcodeOptimizations: false}

config, eips, err := GetChainConfig(subtest.Fork)
if err != nil {
Expand Down

0 comments on commit e71fbc0

Please sign in to comment.