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:56:54 +0200 |
commit | 12927dd315e22b2cc0caa02e9f355c807ea7326a (patch) | |
tree | ceee7dd0aefd20343d6c5a8f0187f2cfb5954f04 | |
parent | c6727f34d16e726ef06dcd7ec8b814f7e986aec4 (diff) | |
download | bitcoin-12927dd315e22b2cc0caa02e9f355c807ea7326a.tar.xz |
Fix crashing bug caused by orphan(s) with duplicate prevout.hash
Rebased-From: def2fdb
Rebased-By: Wladimir J. van der Laan
-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 8cae23a139..07b20906f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); |