Added missing GetTx (0x16) wire message

This commit is contained in:
obscuren
2014-03-28 11:20:07 +01:00
parent 60fd2f3521
commit b888652201
3 changed files with 25 additions and 3 deletions

View File

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