Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Jun 20, 2024
1 parent 821eb69 commit 3f07a5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions eth/tracers/internal/tracetest/calltrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ func testCallTracer(tracerName string, dirPath string, t *testing.T) {
continue
}
file := file // capture range variable
if file.Name() != "simple_onlytop.json" {
continue
}
t.Run(camel(strings.TrimSuffix(file.Name(), ".json")), func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -389,6 +392,8 @@ func TestInternals(t *testing.T) {
t.Fatalf("test %v: failed to sign transaction: %v", tc.name, err)
}

state.StateDB.SetLogger(tc.tracer.Hooks)

txContext := vm.TxContext{
Origin: origin,
GasPrice: tx.GasPrice(),
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/native/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func newCallTracerObject(ctx *tracers.Context, cfg json.RawMessage) (*callTracer
// OnEnter is called when EVM enters a new scope (via call, create or selfdestruct).
func (t *callTracer) OnEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
t.depth = depth
if t.config.OnlyTopCall && depth > 1 {
if t.config.OnlyTopCall && depth > 0 {
return
}
// Skip if tracing was interrupted
Expand Down

0 comments on commit 3f07a5d

Please sign in to comment.