eth/tracers: make native calltracer default (#23867)

verkle/onleaf
Sina Mahmoodi 3 years ago committed by GitHub
parent 851256e856
commit 787a3b185c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      eth/tracers/api_test.go
  2. 20
      eth/tracers/internal/tracers/assets.go
  3. 0
      eth/tracers/internal/tracers/call_tracer_js.js
  4. 2
      eth/tracers/native/call.go
  5. 6
      eth/tracers/testing/calltrace_test.go
  6. 2
      eth/tracers/tracers_test.go

@ -325,7 +325,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

File diff suppressed because one or more lines are too long

@ -31,7 +31,7 @@ import (
)
func init() {
tracers.RegisterNativeTracer("callTracerNative", NewCallTracer)
tracers.RegisterNativeTracer("callTracer", NewCallTracer)
}
type callFrame struct {

@ -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) {

@ -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)
}

Loading…
Cancel
Save