mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-20 12:00:52 +00:00
Fix #794. Only remove transactions from memory pool when they're actually in the memory pool.
This commit is contained in:
parent
328b26d40b
commit
74f28bf1fd
14
src/main.cpp
14
src/main.cpp
@ -618,11 +618,15 @@ bool CTransaction::RemoveFromMemoryPool()
|
||||
// Remove transaction from memory pool
|
||||
CRITICAL_BLOCK(cs_mapTransactions)
|
||||
{
|
||||
BOOST_FOREACH(const CTxIn& txin, vin)
|
||||
mapNextTx.erase(txin.prevout);
|
||||
mapTransactions.erase(GetHash());
|
||||
nTransactionsUpdated++;
|
||||
--nPooledTx;
|
||||
uint256 hash = GetHash();
|
||||
if (mapTransactions.count(hash))
|
||||
{
|
||||
BOOST_FOREACH(const CTxIn& txin, vin)
|
||||
mapNextTx.erase(txin.prevout);
|
||||
mapTransactions.erase(hash);
|
||||
nTransactionsUpdated++;
|
||||
--nPooledTx;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user