Merge pull request #1461 from bas-vk/eth_resend

Old transaction after resend was not removed from pool
This commit is contained in:
Jeffrey Wilcke
2015-08-01 16:18:54 -07:00
4 changed files with 23 additions and 10 deletions

View File

@ -356,11 +356,12 @@ func (self *TxPool) RemoveTransactions(txs types.Transactions) {
self.mu.Lock()
defer self.mu.Unlock()
for _, tx := range txs {
self.removeTx(tx.Hash())
self.RemoveTx(tx.Hash())
}
}
func (pool *TxPool) removeTx(hash common.Hash) {
// RemoveTx removes the transaction with the given hash from the pool.
func (pool *TxPool) RemoveTx(hash common.Hash) {
// delete from pending pool
delete(pool.pending, hash)
// delete from queue