Update to support accepting ledgers acquired during the history fill.

This commit is contained in:
JoelKatz
2012-10-24 07:26:05 -07:00
parent 5684a8e233
commit 0ac4185ff9
7 changed files with 24 additions and 9 deletions

View File

@@ -337,7 +337,7 @@ uint256 Ledger::getHash()
return mHash;
}
void Ledger::saveAcceptedLedger()
void Ledger::saveAcceptedLedger(bool fromConsensus)
{ // can be called in a different thread
static boost::format ledgerExists("SELECT LedgerSeq FROM Ledgers where LedgerSeq = %d;");
static boost::format deleteLedger("DELETE FROM Ledgers WHERE LedgerSeq = %d;");
@@ -428,6 +428,9 @@ void Ledger::saveAcceptedLedger()
mAccountHash.GetHex() % mTransHash.GetHex()));
}
if (!fromConsensus)
return;
theApp->getOPs().pubLedger(shared_from_this());
if(theConfig.FULL_HISTORY)