diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-09-02 19:44:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 19:44:23 +0800 |
commit | a42b7355f40fbc58893ca074db818d461083912c (patch) | |
tree | 1217ca54edf4fc72734dc00bf09d4a827106bd82 /eth/sync.go | |
parent | 49227f65ff5ae42d47dfb65eaf88d38790543b06 (diff) | |
parent | b4a52513915d5a39ac055fc38cafed70098eb698 (diff) | |
download | dexon-a42b7355f40fbc58893ca074db818d461083912c.tar dexon-a42b7355f40fbc58893ca074db818d461083912c.tar.gz dexon-a42b7355f40fbc58893ca074db818d461083912c.tar.bz2 dexon-a42b7355f40fbc58893ca074db818d461083912c.tar.lz dexon-a42b7355f40fbc58893ca074db818d461083912c.tar.xz dexon-a42b7355f40fbc58893ca074db818d461083912c.tar.zst dexon-a42b7355f40fbc58893ca074db818d461083912c.zip |
Merge pull request #2742 from karalabe/tx-spam-protection
Transaction pool optimizations
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 } |