aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-08-21 16:32:50 +0800
committerGitHub <noreply@github.com>2018-08-21 16:32:50 +0800
commitecca49e078ace5f867cccdf5c291e3e84dc19982 (patch)
tree8376fc34f2c539d0fc18a51f4404176598300741
parent7d38d53ae449c6ec06f7b0579f1a189b02222a60 (diff)
parent106d196ec4a6451efedc60ab15957f231fa85639 (diff)
downloaddexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar.gz
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar.bz2
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar.lz
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar.xz
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.tar.zst
dexon-ecca49e078ace5f867cccdf5c291e3e84dc19982.zip
Merge pull request #17460 from holiman/tracerfix
Ensure from < to when tracing chain
-rw-r--r--eth/api_tracer.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go
index 722e2a6e3..704a6cdba 100644
--- a/eth/api_tracer.go
+++ b/eth/api_tracer.go
@@ -119,6 +119,9 @@ func (api *PrivateDebugAPI) TraceChain(ctx context.Context, start, end rpc.Block
if to == nil {
return nil, fmt.Errorf("end block #%d not found", end)
}
+ if from.Number().Cmp(to.Number()) >= 0 {
+ return nil, fmt.Errorf("end block (#%d) needs to come after start block (#%d)", end, start)
+ }
return api.traceChain(ctx, from, to, config)
}