Bugfixes.

This commit is contained in:
JoelKatz
2012-07-14 02:14:50 -07:00
parent 5f5633c163
commit 53594f126f
2 changed files with 13 additions and 16 deletions

View File

@@ -130,21 +130,18 @@ void Application::run()
Log(lsINFO) << "Root account: " << rootAddress.humanAccountID();
{
Ledger::pointer ledger = boost::make_shared<Ledger>(rootAddress, SYSTEM_CURRENCY_START);
assert(!!ledger->getAccountState(rootAddress));
ledger->updateHash();
ledger->setClosed();
ledger->setAccepted();
mMasterLedger.pushLedger(ledger);
Ledger::pointer firstLedger = boost::make_shared<Ledger>(rootAddress, SYSTEM_CURRENCY_START);
assert(!!firstLedger->getAccountState(rootAddress));
firstLedger->updateHash();
firstLedger->setClosed();
firstLedger->setAccepted();
mMasterLedger.pushLedger(firstLedger);
for (int i = 0; i < 2; ++i)
{
ledger = boost::make_shared<Ledger>(true, boost::ref(*ledger));
ledger->setClosed();
ledger->setAccepted();
mMasterLedger.pushLedger(ledger);
assert(!!ledger->getAccountState(rootAddress));
}
Ledger::pointer secondLedger = boost::make_shared<Ledger>(true, boost::ref(*firstLedger));
secondLedger->setClosed();
secondLedger->setAccepted();
mMasterLedger.pushLedger(secondLedger, boost::make_shared<Ledger>(true, boost::ref(*secondLedger)));
assert(!!secondLedger->getAccountState(rootAddress));
}
mNetOps.setStateTimer();