aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-07-01 23:59:55 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-09-02 19:12:03 +0800
commit0ef327bbee79c01a69ba59258acc6ce3a48bc288 (patch)
tree1d43179977d96c5ca7de85e0727cfa69dbb230ed /eth/sync.go
parent795b70423eac7180ab85b735f64aae9d6a10449d (diff)
downloaddexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.gz
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.bz2
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.lz
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.xz
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.zst
dexon-0ef327bbee79c01a69ba59258acc6ce3a48bc288.zip
core, eth, internal, miner: optimize txpool for quick ops
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/eth/sync.go b/eth/sync.go
index e1946edda..6584bb1e2 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -45,7 +45,10 @@ type txsync struct {
// syncTransactions starts sending all currently pending transactions to the given peer.
func (pm *ProtocolManager) syncTransactions(p *peer) {
- txs := pm.txpool.GetTransactions()
+ var txs types.Transactions
+ for _, batch := range pm.txpool.Pending() {
+ txs = append(txs, batch...)
+ }
if len(txs) == 0 {
return
}