mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-22 21:39:52 +00:00
Fix crashing bug caused by orphan(s) with duplicate prevout.hash
Rebased-From: def2fdb Rebased-By: Wladimir J. van der Laan
This commit is contained in:
parent
c6727f34d1
commit
12927dd315
@ -443,6 +443,8 @@ void static EraseOrphanTx(uint256 hash)
|
||||
BOOST_FOREACH(const CTxIn& txin, it->second.vin)
|
||||
{
|
||||
map<uint256, set<uint256> >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash);
|
||||
if (itPrev == mapOrphanTransactionsByPrev.end())
|
||||
continue;
|
||||
itPrev->second.erase(hash);
|
||||
if (itPrev->second.empty())
|
||||
mapOrphanTransactionsByPrev.erase(itPrev);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user