Skip to content

Commit

Permalink
Fix crashing bug caused by orphan(s) with duplicate prevout.hash
Browse files Browse the repository at this point in the history
Rebased-From: def2fdb
Rebased-By: Wladimir J. van der Laan
  • Loading branch information
gavinandresen authored and Ross Nicoll committed Sep 18, 2014
1 parent 5819a76 commit 678ea26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,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);
Expand Down

0 comments on commit 678ea26

Please sign in to comment.