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

This commit is contained in:
Sina Mahmoodi 2021-11-08 14:08:12 +01:00 committed by GitHub
parent 851256e856
commit 787a3b185c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 16 deletions

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