mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix a typo. Add some asserts.
This commit is contained in:
@@ -105,16 +105,20 @@ void Application::run()
|
|||||||
NewcoinAddress rootFamilyGenerator; // Hold the generator.
|
NewcoinAddress rootFamilyGenerator; // Hold the generator.
|
||||||
NewcoinAddress rootAddress;
|
NewcoinAddress rootAddress;
|
||||||
|
|
||||||
rootFamilySeed.setFamilySeed(CKey::PassPhraseToKey("This is my payphrase"));
|
rootFamilySeed.setFamilySeed(CKey::PassPhraseToKey("This is my payphrase."));
|
||||||
rootFamilyGenerator.setFamilyGenerator(rootFamilySeed);
|
rootFamilyGenerator.setFamilyGenerator(rootFamilySeed);
|
||||||
rootAddress.setAccountPublic(rootFamilyGenerator, 0);
|
rootAddress.setAccountPublic(rootFamilyGenerator, 0);
|
||||||
|
std::cerr << "Root account: " << rootAddress.humanAccountID() << std::endl;
|
||||||
|
|
||||||
Ledger::pointer firstLedger(new Ledger(rootAddress, 100000000));
|
Ledger::pointer firstLedger(new Ledger(rootAddress, 100000000));
|
||||||
|
assert(!!firstLedger->getAccountState(rootAddress));
|
||||||
firstLedger->setClosed();
|
firstLedger->setClosed();
|
||||||
firstLedger->setAccepted();
|
firstLedger->setAccepted();
|
||||||
mMasterLedger.pushLedger(firstLedger);
|
mMasterLedger.pushLedger(firstLedger);
|
||||||
|
|
||||||
Ledger::pointer secondLedger = firstLedger->closeLedger(time(NULL));
|
Ledger::pointer secondLedger = firstLedger->closeLedger(time(NULL));
|
||||||
mMasterLedger.pushLedger(secondLedger);
|
mMasterLedger.pushLedger(secondLedger);
|
||||||
|
assert(!!secondLedger->getAccountState(rootAddress));
|
||||||
mMasterLedger.setSynced();
|
mMasterLedger.setSynced();
|
||||||
// temporary
|
// temporary
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user