bugfix, pending transaction was resend with new gas price/limit but not removed from transaction pool

This commit is contained in:
Bas van Kervel
2015-07-10 11:35:15 +02:00
parent 5a810758db
commit 7e31df3987
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