aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
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 26827c289..9acd39e31 100644
--- a/ethchain/transaction_pool.go
+++ b/ethchain/transaction_pool.go
@@ -208,7 +208,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()
@@ -222,6 +222,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()