Count a ledger as present (for purposes of allowing clients that trust us to

query it) only when it has been validated.
This commit is contained in:
JoelKatz
2013-01-03 21:04:11 -08:00
parent ea514b7cf3
commit b7fe1424fb
2 changed files with 4 additions and 6 deletions

View File

@@ -218,6 +218,9 @@ void LedgerMaster::fixMismatch(Ledger::ref ledger)
{
int invalidate = 0;
mMissingLedger.reset();
mMissingSeq = 0;
for (uint32 lSeq = ledger->getLedgerSeq() - 1; lSeq > 0; --lSeq)
if (mCompleteLedgers.hasValue(lSeq))
{
@@ -233,11 +236,6 @@ void LedgerMaster::fixMismatch(Ledger::ref ledger)
}
}
mCompleteLedgers.clearValue(lSeq);
if (mMissingSeq == lSeq)
{
mMissingLedger.reset();
mMissingSeq = 0;
}
++invalidate;
}
@@ -400,6 +398,7 @@ void LedgerMaster::pubThread()
BOOST_FOREACH(Ledger::ref l, ledgers)
{
setFullLedger(l); // OPTIMIZEME: This is actually more work than we need to do
theApp->getOPs().pubLedger(l);
BOOST_FOREACH(callback& c, mOnValidate)
{