From a14c9fdcf162641c030e7d5aedeecbc93ad615a0 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 26 Apr 2012 18:57:34 -0700 Subject: [PATCH] Fix a typo. Add some asserts. --- src/Application.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 23bb43b94..ccd2ca404 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -105,16 +105,20 @@ void Application::run() NewcoinAddress rootFamilyGenerator; // Hold the generator. NewcoinAddress rootAddress; - rootFamilySeed.setFamilySeed(CKey::PassPhraseToKey("This is my payphrase")); + rootFamilySeed.setFamilySeed(CKey::PassPhraseToKey("This is my payphrase.")); rootFamilyGenerator.setFamilyGenerator(rootFamilySeed); rootAddress.setAccountPublic(rootFamilyGenerator, 0); + std::cerr << "Root account: " << rootAddress.humanAccountID() << std::endl; Ledger::pointer firstLedger(new Ledger(rootAddress, 100000000)); + assert(!!firstLedger->getAccountState(rootAddress)); firstLedger->setClosed(); firstLedger->setAccepted(); mMasterLedger.pushLedger(firstLedger); - Ledger::pointer secondLedger=firstLedger->closeLedger(time(NULL)); + + Ledger::pointer secondLedger = firstLedger->closeLedger(time(NULL)); mMasterLedger.pushLedger(secondLedger); + assert(!!secondLedger->getAccountState(rootAddress)); mMasterLedger.setSynced(); // temporary