Browse Source

Fix crashing bug caused by orphan(s) with duplicate prevout.hash

0.10
Gavin Andresen 10 years ago committed by Wladimir J. van der Laan
parent
commit
def2fdb4b9
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/main.cpp

2
src/main.cpp

@ -498,6 +498,8 @@ void static EraseOrphanTx(uint256 hash) @@ -498,6 +498,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…
Cancel
Save