Skip to content

Commit

Permalink
eth/tracers: make native calltracer default (ethereum#23867)
Browse files Browse the repository at this point in the history
  • Loading branch information
s1na authored and zzyalbert committed Nov 26, 2021
1 parent 7bcc275 commit 342540a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion eth/tracers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func TestOverriddenTraceCall(t *testing.T) {
tx, _ := types.SignTx(types.NewTransaction(uint64(i), accounts[1].addr, big.NewInt(1000), params.TxGas, b.BaseFee(), nil), signer, accounts[0].key)
b.AddTx(tx)
}))
randomAccounts, tracer := newAccounts(3), "callTracer"
randomAccounts, tracer := newAccounts(3), "callTracerJs"

var testSuite = []struct {
blockNumber rpc.BlockNumber
Expand Down
20 changes: 10 additions & 10 deletions eth/tracers/internal/tracers/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion eth/tracers/native/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

func init() {
tracers.RegisterNativeTracer("callTracerNative", NewCallTracer)
tracers.RegisterNativeTracer("callTracer", NewCallTracer)
}

type callFrame struct {
Expand Down
6 changes: 3 additions & 3 deletions eth/tracers/testing/calltrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ func TestCallTracerLegacy(t *testing.T) {
testCallTracer("callTracerLegacy", "call_tracer_legacy", t)
}

func TestCallTracer(t *testing.T) {
testCallTracer("callTracer", "call_tracer", t)
func TestCallTracerJs(t *testing.T) {
testCallTracer("callTracerJs", "call_tracer", t)
}

func TestCallTracerNative(t *testing.T) {
testCallTracer("callTracerNative", "call_tracer", t)
testCallTracer("callTracer", "call_tracer", t)
}

func testCallTracer(tracerName string, dirPath string, t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/tracers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func TestZeroValueToNotExitCall(t *testing.T) {
}
_, statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), alloc, false)
// Create the tracer, the EVM environment and run it
tracer, err := New("callTracer", new(Context))
tracer, err := New("callTracerJs", new(Context))
if err != nil {
t.Fatalf("failed to create call tracer: %v", err)
}
Expand Down

0 comments on commit 342540a

Please sign in to comment.