aboutsummaryrefslogtreecommitdiffstats
path: root/ethstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-05-18 16:45:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-05-18 17:08:24 +0800
commit49719e21bcd740c5890334f8c0ec8ac3777fb4c6 (patch)
tree81caf3f5e52d25597f16a21b61b4d91ee4e023b0 /ethstats
parenta2e43d28d01ef9642c7f6992b78b86bd0696c847 (diff)
downloaddexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.gz
dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.zst
dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.zip
core, eth: minor txpool event cleanups
Diffstat (limited to 'ethstats')
-rw-r--r--ethstats/ethstats.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go
index 17f9f3c7a..c11601435 100644
--- a/ethstats/ethstats.go
+++ b/ethstats/ethstats.go
@@ -49,7 +49,7 @@ const (
// history request.
historyUpdateRange = 50
- // txChanSize is the size of channel listening to TxsPreEvent.
+ // txChanSize is the size of channel listening to NewTxsEvent.
// The number is referenced from the size of tx pool.
txChanSize = 4096
// chainHeadChanSize is the size of channel listening to ChainHeadEvent.
@@ -57,9 +57,9 @@ const (
)
type txPool interface {
- // SubscribeTxPreEvent should return an event subscription of
- // TxsPreEvent and send events to the given channel.
- SubscribeTxPreEvent(chan<- core.TxsPreEvent) event.Subscription
+ // SubscribeNewTxsEvent should return an event subscription of
+ // NewTxsEvent and send events to the given channel.
+ SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
}
type blockChain interface {
@@ -150,8 +150,8 @@ func (s *Service) loop() {
headSub := blockchain.SubscribeChainHeadEvent(chainHeadCh)
defer headSub.Unsubscribe()
- txEventCh := make(chan core.TxsPreEvent, txChanSize)
- txSub := txpool.SubscribeTxPreEvent(txEventCh)
+ txEventCh := make(chan core.NewTxsEvent, txChanSize)
+ txSub := txpool.SubscribeNewTxsEvent(txEventCh)
defer txSub.Unsubscribe()
// Start a goroutine that exhausts the subsciptions to avoid events piling up