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