diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-07-01 23:59:55 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-09-02 19:12:03 +0800 |
commit | 0ef327bbee79c01a69ba59258acc6ce3a48bc288 (patch) | |
tree | 1d43179977d96c5ca7de85e0727cfa69dbb230ed /eth/sync.go | |
parent | 795b70423eac7180ab85b735f64aae9d6a10449d (diff) | |
download | go-tangerine-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.gz go-tangerine-0ef327bbee79c01a69ba59258acc6ce3a48bc288.tar.zst go-tangerine-0ef327bbee79c01a69ba59258acc6ce3a48bc288.zip |
core, eth, internal, miner: optimize txpool for quick ops
Diffstat (limited to 'eth/sync.go')
-rw-r--r-- | eth/sync.go | 5 |
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 } |