aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-28 18:20:07 +0800
committerobscuren <geffobscura@gmail.com>2014-03-28 18:20:07 +0800
commitb888652201277ab86e9e8c280e75e23ced5e3d38 (patch)
tree3685b52bf1d738a8b2167876295aa1a0db29b34e /ethchain/transaction_pool.go
parent60fd2f3521471b300107847271f4df2919f1b0d4 (diff)
downloaddexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.gz
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.bz2
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.lz
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.xz
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.tar.zst
dexon-b888652201277ab86e9e8c280e75e23ced5e3d38.zip
Added missing GetTx (0x16) wire message
Diffstat (limited to 'ethchain/transaction_pool.go')
-rw-r--r--ethchain/transaction_pool.go8
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()