Skip to content

Commit

Permalink
tweak: no future txs in stream.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Dec 6, 2023
1 parent bda0b19 commit c53379e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions eth/filters/trace_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ func (api *FilterAPI) NewPendingTransactionsWithTrace(ctx context.Context, trace
pendingTxSub := api.events.SubscribePendingTxs(pendingTxs)
defer pendingTxSub.Unsubscribe()

futureTxs := make(chan []*types.Transaction, 128)
futureTxSub := api.events.SubscribeFutureTxs(futureTxs)
defer futureTxSub.Unsubscribe()

tracerOpts, err := getTracerOpts(tracerOptsJSON, defaultTxTraceOpts)
if err != nil {
log.Error("pending_txs_stream: failed to parse tracer options", "err", err)
Expand All @@ -77,8 +73,6 @@ func (api *FilterAPI) NewPendingTransactionsWithTrace(ctx context.Context, trace
select {
case txs = <-pendingTxs:
txsAreFuture = false
case txs = <-futureTxs:
txsAreFuture = true
case <-rpcSub.Err():
return
case <-notifier.Closed():
Expand Down

0 comments on commit c53379e

Please sign in to comment.