From 1005313ed841638b8e36d61f7fd3f61741708389 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 14 Oct 2012 23:25:15 -0700 Subject: [PATCH] Make sure to write the root node of the genesis ledger to the database. --- src/Ledger.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Ledger.cpp b/src/Ledger.cpp index ae4e18d8be..c5000e0681 100644 --- a/src/Ledger.cpp +++ b/src/Ledger.cpp @@ -31,11 +31,12 @@ Ledger::Ledger(const NewcoinAddress& masterID, uint64 startAmount) : mTotCoins(s AccountState::pointer startAccount = boost::make_shared(masterID); startAccount->peekSLE().setFieldAmount(sfBalance, startAmount); startAccount->peekSLE().setFieldU32(sfSequence, 1); + cLog(lsTRACE) << "root account: " << startAccount->peekSLE().getJson(0); + + mAccountStateMap->armDirty(); writeBack(lepCREATE, startAccount->getSLE()); -#if 0 - std::cerr << "Root account:"; - startAccount->dump(); -#endif + mAccountStateMap->flushDirty(256, hotACCOUNT_NODE, mLedgerSeq); + mAccountStateMap->disarmDirty(); } Ledger::Ledger(const uint256 &parentHash, const uint256 &transHash, const uint256 &accountHash,