mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Check ledger sanity.
This commit is contained in:
@@ -235,8 +235,11 @@ void Application::loadOldLedger()
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
assert(lastLedger->getAccountHash() == lastLedger->peekAccountStateMap()->getHash());
|
||||
assert(lastLedger->getTransHash() == lastLedger->peekTransactionMap()->getHash());
|
||||
if (!lastLedger->assertSane())
|
||||
{
|
||||
cLog(lsFATAL) << "Ledger is not sane.";
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
Ledger::pointer openLedger = boost::make_shared<Ledger>(false, boost::ref(*lastLedger));
|
||||
mMasterLedger.switchLedgers(lastLedger, openLedger);
|
||||
|
||||
Reference in New Issue
Block a user