Unverified Commit ecca49e0 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #17460 from holiman/tracerfix

Ensure from < to when tracing chain
parents 7d38d53a 106d196e
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment