eth/filters: remove use of event.TypeMux for pending logs (#20312)

This commit is contained in:
Felix Lange
2019-12-10 12:39:14 +01:00
committed by GitHub
parent b8bc9b3d8e
commit d90d1db609
13 changed files with 240 additions and 247 deletions

View File

@@ -128,6 +128,9 @@ type worker struct {
eth Backend
chain *core.BlockChain
// Feeds
pendingLogsFeed event.Feed
// Subscriptions
mux *event.TypeMux
txsCh chan core.NewTxsEvent
@@ -809,7 +812,7 @@ func (w *worker) commitTransactions(txs *types.TransactionsByPriceAndNonce, coin
cpy[i] = new(types.Log)
*cpy[i] = *l
}
go w.mux.Post(core.PendingLogsEvent{Logs: cpy})
w.pendingLogsFeed.Send(cpy)
}
// Notify resubmit loop to decrease resubmitting interval if current interval is larger
// than the user-specified one.