aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/transaction_pool.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-04-01 20:20:55 +0800
committerMaran <maran.hidskes@gmail.com>2014-04-01 20:20:55 +0800
commit0a8801082676d64f904cbb5b62c1159e0bbd7788 (patch)
tree05e9c4ea80d5e01cca53d583318f43606418a19e /ethchain/transaction_pool.go
parent5f49a659c36dbfb8c330ddc3d4565c19a9a936b5 (diff)
parent7277c420479239fbea78417e42c43ee0162c2728 (diff)
downloaddexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.tar.gz
dexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.tar.zst
dexon-0a8801082676d64f904cbb5b62c1159e0bbd7788.zip
Merge conflicts
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()