Fix the reason we couldn't recover ledgers. Ledger base data must be stored in CAS.

This commit is contained in:
JoelKatz
2013-01-12 23:54:23 -08:00
parent a0bfd57937
commit 9fd2b543e8

View File

@@ -378,6 +378,12 @@ void Ledger::saveAcceptedLedger(bool fromConsensus, LoadEvent::pointer event)
assert (getAccountHash() == mAccountStateMap->getHash());
assert (getTransHash() == mTransactionMap->getHash());
// Save the ledger header in the hashed object store
Serializer s(128);
s.add32(sHP_Ledger);
addRaw(s);
theApp->getHashedObjectStore().store(hotLEDGER, mLedgerSeq, s.peekData(), mHash);
{
{
ScopedLock sl(theApp->getLedgerDB()->getDBLock());