diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-05-18 16:45:52 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-05-18 17:08:24 +0800 |
commit | 49719e21bcd740c5890334f8c0ec8ac3777fb4c6 (patch) | |
tree | 81caf3f5e52d25597f16a21b61b4d91ee4e023b0 /light/txpool.go | |
parent | a2e43d28d01ef9642c7f6992b78b86bd0696c847 (diff) | |
download | go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.gz go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.bz2 go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.lz go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.xz go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.zst go-tangerine-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.zip |
core, eth: minor txpool event cleanups
Diffstat (limited to 'light/txpool.go')
-rw-r--r-- | light/txpool.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/light/txpool.go b/light/txpool.go index bedfd48a2..1fabc3dc5 100644 --- a/light/txpool.go +++ b/light/txpool.go @@ -321,9 +321,9 @@ func (pool *TxPool) Stop() { log.Info("Transaction pool stopped") } -// SubscribeTxPreEvent registers a subscription of core.TxsPreEvent and +// SubscribeNewTxsEvent registers a subscription of core.NewTxsEvent and // starts sending event to the given channel. -func (pool *TxPool) SubscribeTxPreEvent(ch chan<- core.TxsPreEvent) event.Subscription { +func (pool *TxPool) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription { return pool.scope.Track(pool.txFeed.Subscribe(ch)) } @@ -412,7 +412,7 @@ func (self *TxPool) add(ctx context.Context, tx *types.Transaction) error { // Notify the subscribers. This event is posted in a goroutine // because it's possible that somewhere during the post "Remove transaction" // gets called which will then wait for the global tx pool lock and deadlock. - go self.txFeed.Send(core.TxsPreEvent{types.Transactions{tx}}) + go self.txFeed.Send(core.NewTxsEvent{Txs: types.Transactions{tx}}) } // Print a log message if low enough level is set |