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 /eth/handler.go | |
parent | a2e43d28d01ef9642c7f6992b78b86bd0696c847 (diff) | |
download | dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.gz dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.bz2 dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.lz dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.xz dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.tar.zst dexon-49719e21bcd740c5890334f8c0ec8ac3777fb4c6.zip |
core, eth: minor txpool event cleanups
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/handler.go b/eth/handler.go index 7ef8e957a..8993afe15 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -46,7 +46,7 @@ const ( softResponseLimit = 2 * 1024 * 1024 // Target maximum size of returned blocks, headers or node data. estHeaderRlpSize = 500 // Approximate size of an RLP encoded block header - // 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 ) @@ -81,7 +81,7 @@ type ProtocolManager struct { SubProtocols []p2p.Protocol eventMux *event.TypeMux - txsCh chan core.TxsPreEvent + txsCh chan core.NewTxsEvent txsSub event.Subscription minedBlockSub *event.TypeMuxSubscription @@ -204,8 +204,8 @@ func (pm *ProtocolManager) Start(maxPeers int) { pm.maxPeers = maxPeers // broadcast transactions - pm.txsCh = make(chan core.TxsPreEvent, txChanSize) - pm.txsSub = pm.txpool.SubscribeTxPreEvent(pm.txsCh) + pm.txsCh = make(chan core.NewTxsEvent, txChanSize) + pm.txsSub = pm.txpool.SubscribeNewTxsEvent(pm.txsCh) go pm.txBroadcastLoop() // broadcast mined blocks |