Don't remove shot down ledgers from the range we propagate to peers.

This commit is contained in:
JoelKatz
2013-08-12 11:46:02 -07:00
parent 69477c96ca
commit f4c6fa7873
6 changed files with 33 additions and 9 deletions

View File

@@ -235,8 +235,30 @@ bool LedgerMaster::haveLedger (uint32 seq)
return mCompleteLedgers.hasValue (seq);
}
bool LedgerMaster::getFullValidatedRange (uint32& minVal, uint32& maxVal)
{ // Ledgers we have all the nodes for
boost::recursive_mutex::scoped_lock sl (mLock);
if (!mPubLedger)
return false;
maxVal = mPubLedger->getLedgerSeq ();
if (maxVal == 0)
return false;
minVal = mCompleteLedgers.prevMissing (maxVal);
if (minVal == RangeSet::absent)
minVal = 0;
else
++minVal;
return true;
}
bool LedgerMaster::getValidatedRange (uint32& minVal, uint32& maxVal)
{
{ // Ledgers we have all the nodes for and are indexed
boost::recursive_mutex::scoped_lock sl (mLock);
if (!mPubLedger)