|
|
|
@ -226,7 +226,7 @@ func (api *API) TraceChain(ctx context.Context, start, end rpc.BlockNumber, conf |
|
|
|
|
} |
|
|
|
|
sub := notifier.CreateSubscription() |
|
|
|
|
|
|
|
|
|
resCh := api.traceChain(from, to, config, notifier.Closed()) |
|
|
|
|
resCh := api.traceChain(from, to, config, sub.Err()) |
|
|
|
|
go func() { |
|
|
|
|
for result := range resCh { |
|
|
|
|
notifier.Notify(sub.ID, result) |
|
|
|
@ -240,7 +240,7 @@ func (api *API) TraceChain(ctx context.Context, start, end rpc.BlockNumber, conf |
|
|
|
|
// the end block but excludes the start one. The return value will be one item per
|
|
|
|
|
// transaction, dependent on the requested tracer.
|
|
|
|
|
// The tracing procedure should be aborted in case the closed signal is received.
|
|
|
|
|
func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed <-chan interface{}) chan *blockTraceResult { |
|
|
|
|
func (api *API) traceChain(start, end *types.Block, config *TraceConfig, closed <-chan error) chan *blockTraceResult { |
|
|
|
|
reexec := defaultTraceReexec |
|
|
|
|
if config != nil && config.Reexec != nil { |
|
|
|
|
reexec = *config.Reexec |
|
|
|
|