forked from cerc-io/plugeth
Fixed nill pointer error.
This commit is contained in:
parent
2f93e2ae10
commit
80ee3f61e6
@ -872,15 +872,18 @@ func (api *API) traceTx(ctx context.Context, message core.Message, txctx *Contex
|
|||||||
}
|
}
|
||||||
// Default tracer is the struct logger
|
// Default tracer is the struct logger
|
||||||
tracer = logger.NewStructLogger(config.Config)
|
tracer = logger.NewStructLogger(config.Config)
|
||||||
// Get the tracer from the plugin loader
|
|
||||||
//begin PluGeth code injection
|
if config.Tracer != nil {
|
||||||
if tr, ok := getPluginTracer(*config.Tracer); ok {
|
// Get the tracer from the plugin loader
|
||||||
//end PluGeth code injection
|
//begin PluGeth code injection
|
||||||
tracer = tr(statedb, vmctx)
|
if tr, ok := getPluginTracer(*config.Tracer); ok {
|
||||||
} else if config.Tracer != nil {
|
//end PluGeth code injection
|
||||||
tracer, err = New(*config.Tracer, txctx)
|
tracer = tr(statedb, vmctx)
|
||||||
if err != nil {
|
} else {
|
||||||
return nil, err
|
tracer, err = New(*config.Tracer, txctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Define a meaningful timeout of a single transaction trace
|
// Define a meaningful timeout of a single transaction trace
|
||||||
|
Loading…
Reference in New Issue
Block a user