diff --git a/src/cpp/ripple/LedgerConsensus.cpp b/src/cpp/ripple/LedgerConsensus.cpp index 9e1c2d00df..9a2ee1e093 100644 --- a/src/cpp/ripple/LedgerConsensus.cpp +++ b/src/cpp/ripple/LedgerConsensus.cpp @@ -395,10 +395,17 @@ void LedgerConsensus::mapComplete(const uint256& hash, SHAMap::ref map, bool acq } assert(hash == map->getHash()); + boost::unordered_map::iterator it = mAcquired.find(hash); if (mAcquired.find(hash) != mAcquired.end()) { - mAcquiring.erase(hash); - return; // we already have this map + if (it->second) + { + mAcquiring.erase(hash); + return; // we already have this map + } + + // We previously failed to acquire this map, now we have it + mAcquired.erase(hash); } if (mOurPosition && (!mOurPosition->isBowOut()) && (hash != mOurPosition->getCurrentHash()))