working commit 4/19

This commit is contained in:
philip-morlier 2023-04-19 10:32:26 -07:00
parent c3924a529e
commit 86b30777b8

View File

@ -957,14 +957,17 @@ func (api *API) traceTx(ctx context.Context, message *core.Message, txctx *Conte
if config == nil { if config == nil {
config = &TraceConfig{} config = &TraceConfig{}
} }
log.Error("outside of geth condition", "config", config.Tracer)
// Default tracer is the struct logger // Default tracer is the struct logger
tracer = logger.NewStructLogger(config.Config) tracer = logger.NewStructLogger(config.Config)
if config.Tracer != nil { if config.Tracer != nil {
// Get the tracer from the plugin loader // Get the tracer from the plugin loader
//begin PluGeth code injection //begin PluGeth code injection
if tr, ok := getPluginTracer(*config.Tracer); ok { if tr, ok := getPluginTracer(*config.Tracer); ok {
log.Error("inside geth", "tracer config", *config.Tracer)
tracer = tr(statedb, vmctx) tracer = tr(statedb, vmctx)
} else { } else {
log.Error("default geth condition", "config", config.Tracer)
tracer, err = DefaultDirectory.New(*config.Tracer, txctx, config.TracerConfig) tracer, err = DefaultDirectory.New(*config.Tracer, txctx, config.TracerConfig)
if err != nil { if err != nil {
return nil, err return nil, err