From 7a300f6c7b8aad6e4e86a30c687435426f0bf25a Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 5 Sep 2012 10:18:23 -0700 Subject: [PATCH] Fix deadlock. --- src/ValidationCollection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ValidationCollection.cpp b/src/ValidationCollection.cpp index 28cb2a59d..74039ad00 100644 --- a/src/ValidationCollection.cpp +++ b/src/ValidationCollection.cpp @@ -177,8 +177,9 @@ void ValidationCollection::addDeadLedger(const uint256& ledger) { boost::mutex::scoped_lock sl(mValidationLock); - if (isDeadLedger(ledger)) - return; + BOOST_FOREACH(const uint256& it, mDeadLedgers) + if (it == ledger) + return; mDeadLedgers.push_back(ledger); if (mDeadLedgers.size() >= 32)