Don't allow an unlimited amount of work to build up for the ledger accept engine.

This commit is contained in:
JoelKatz
2012-10-28 19:36:02 -07:00
parent c9a2482c95
commit 851d21a5aa
4 changed files with 45 additions and 5 deletions

View File

@@ -38,8 +38,7 @@ void LedgerHistory::addAcceptedLedger(Ledger::pointer ledger, bool fromConsensus
assert(ledger->isImmutable());
mLedgersByIndex.insert(std::make_pair(ledger->getLedgerSeq(), ledger));
boost::thread thread(boost::bind(&Ledger::saveAcceptedLedger, ledger, fromConsensus));
thread.detach();
ledger->pendSave(fromConsensus);
}
Ledger::pointer LedgerHistory::getLedgerBySeq(uint32 index)