eth/tracers: make native calltracer default (#23867)
This commit is contained in:
parent
851256e856
commit
787a3b185c
@ -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)
|
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)
|
b.AddTx(tx)
|
||||||
}))
|
}))
|
||||||
randomAccounts, tracer := newAccounts(3), "callTracer"
|
randomAccounts, tracer := newAccounts(3), "callTracerJs"
|
||||||
|
|
||||||
var testSuite = []struct {
|
var testSuite = []struct {
|
||||||
blockNumber rpc.BlockNumber
|
blockNumber rpc.BlockNumber
|
||||||
|
File diff suppressed because one or more lines are too long
@ -31,7 +31,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
tracers.RegisterNativeTracer("callTracerNative", NewCallTracer)
|
tracers.RegisterNativeTracer("callTracer", NewCallTracer)
|
||||||
}
|
}
|
||||||
|
|
||||||
type callFrame struct {
|
type callFrame struct {
|
||||||
|
@ -61,12 +61,12 @@ func TestCallTracerLegacy(t *testing.T) {
|
|||||||
testCallTracer("callTracerLegacy", "call_tracer_legacy", t)
|
testCallTracer("callTracerLegacy", "call_tracer_legacy", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCallTracer(t *testing.T) {
|
func TestCallTracerJs(t *testing.T) {
|
||||||
testCallTracer("callTracer", "call_tracer", t)
|
testCallTracer("callTracerJs", "call_tracer", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCallTracerNative(t *testing.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) {
|
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)
|
_, statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), alloc, false)
|
||||||
// Create the tracer, the EVM environment and run it
|
// Create the tracer, the EVM environment and run it
|
||||||
tracer, err := New("callTracer", new(Context))
|
tracer, err := New("callTracerJs", new(Context))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to create call tracer: %v", err)
|
t.Fatalf("failed to create call tracer: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user