diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2014-09-09 14:01:11 -0400 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-09-10 16:53:54 +0200 |
commit | def2fdb4b9b52fa908c11fe2f5a42ea04f8e9f11 (patch) | |
tree | addf781b7060f3bb1763be33065df0910e67a528 /src | |
parent | d6af9856b0a3140dfa143cd8261efef91f7f3e76 (diff) |
Fix crashing bug caused by orphan(s) with duplicate prevout.hash
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index f063a48fe5..27100d62c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); |