Browse Source

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

tags/v0.15.1
Gavin Andresen 6 years ago
parent
commit
def2fdb4b9
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/main.cpp

+ 2
- 0
src/main.cpp View File

@@ -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