aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api_tracer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-04 19:58:11 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-01-04 19:58:11 +0800
commitae71da1b03c6eee82b714ef81b4fc59bcc130bb2 (patch)
tree75731143ca64aadc3d29cf6b403867a630c15432 /eth/api_tracer.go
parent7a59a9380e9f12729bb094de4151c3d135bdadf9 (diff)
downloadgo-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar.gz
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar.bz2
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar.lz
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar.xz
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.tar.zst
go-tangerine-ae71da1b03c6eee82b714ef81b4fc59bcc130bb2.zip
eth: fix tracer panic when running without configs + reexec (#15799)
Diffstat (limited to 'eth/api_tracer.go')
-rw-r--r--eth/api_tracer.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go
index 0d0e2a73c..d49f077ae 100644
--- a/eth/api_tracer.go
+++ b/eth/api_tracer.go
@@ -204,7 +204,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
if err != nil {
// If the starting state is missing, allow some number of blocks to be reexecuted
reexec := defaultTraceReexec
- if config.Reexec != nil {
+ if config != nil && config.Reexec != nil {
reexec = *config.Reexec
}
// Find the most recent block that has the state available
@@ -465,7 +465,7 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
return nil, fmt.Errorf("parent %x not found", block.ParentHash())
}
reexec := defaultTraceReexec
- if config.Reexec != nil {
+ if config != nil && config.Reexec != nil {
reexec = *config.Reexec
}
statedb, err := api.computeStateDB(parent, reexec)
@@ -619,7 +619,7 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Ha
return nil, fmt.Errorf("transaction %x not found", hash)
}
reexec := defaultTraceReexec
- if config.Reexec != nil {
+ if config != nil && config.Reexec != nil {
reexec = *config.Reexec
}
msg, vmctx, statedb, err := api.computeTxEnv(blockHash, int(index), reexec)