eth: ensure from<to when tracing chain (credits Chen Nan via bugbounty)

pull/17460/head
Martin Holst Swende 7 years ago
parent 6d1e292eef
commit 106d196ec4
No known key found for this signature in database
GPG Key ID: 683B438C05A5DDF0
  1. 3
      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)
}

Loading…
Cancel
Save