diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-28 18:20:07 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-28 18:20:07 +0800 |
commit | b888652201277ab86e9e8c280e75e23ced5e3d38 (patch) | |
tree | 3685b52bf1d738a8b2167876295aa1a0db29b34e /ethchain | |
parent | 60fd2f3521471b300107847271f4df2919f1b0d4 (diff) | |
download | go-tangerine-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.gz go-tangerine-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.zst go-tangerine-b888652201277ab86e9e8c280e75e23ced5e3d38.zip |
Added missing GetTx (0x16) wire message
Diffstat (limited to 'ethchain')
-rw-r--r-- | ethchain/transaction_pool.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ethchain/transaction_pool.go b/ethchain/transaction_pool.go index fdc386303..4a4f2e809 100644 --- a/ethchain/transaction_pool.go +++ b/ethchain/transaction_pool.go @@ -207,7 +207,7 @@ func (pool *TxPool) QueueTransaction(tx *Transaction) { pool.queueChan <- tx } -func (pool *TxPool) Flush() []*Transaction { +func (pool *TxPool) CurrentTransactions() []*Transaction { pool.mutex.Lock() defer pool.mutex.Unlock() @@ -221,6 +221,12 @@ func (pool *TxPool) Flush() []*Transaction { i++ } + return txList +} + +func (pool *TxPool) Flush() []*Transaction { + txList := pool.CurrentTransactions() + // Recreate a new list all together // XXX Is this the fastest way? pool.pool = list.New() |