From 3e2ecc88cc7a75c08ed5ba0a94cb414907381a86 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 6 Aug 2012 02:32:53 -0700 Subject: [PATCH] Check that we don't already have a dead ledger. --- src/ValidationCollection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ValidationCollection.cpp b/src/ValidationCollection.cpp index cd3f981f2..21888dffa 100644 --- a/src/ValidationCollection.cpp +++ b/src/ValidationCollection.cpp @@ -174,6 +174,9 @@ boost::unordered_map ValidationCollection::getCurrentValidations() void ValidationCollection::addDeadLedger(const uint256& ledger) { + for (std::list::iterator it = mDeadLedgers.begin(), end = mDeadLedgers.end(); it != end; ++it) + if (*it == ledger) + return; mDeadLedgers.push_back(ledger); if (mDeadLedgers.size() >= 128) mDeadLedgers.pop_front();