Merge conflicts

This commit is contained in:
Maran
2014-04-01 14:20:55 +02:00
14 changed files with 234 additions and 182 deletions

View File

@@ -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()