Fire up the initial ledgers and attach them to the application.

This commit is contained in:
JoelKatz
2011-12-13 21:54:17 -08:00
parent 7f9f5c5462
commit 0b25b9641f
6 changed files with 24 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
#include "PeerDoor.h"
#include "RPCDoor.h"
#include "BitcoinUtil.h"
#include "DeterministicKeys.h"
#include "database/SqliteDatabase.h"
//#include <boost/log/trivial.hpp>
#include <iostream>
@@ -29,6 +30,17 @@ Application::Application()
mWallet.load();
mPeerDoor=NULL;
mRPCDoor=NULL;
DetKeySet ks("This is a test payphrase.");
Ledger::pointer firstLedger(new Ledger(ks.getAccountID(0), 1000000));
firstLedger->setClosed();
firstLedger->setAccepted();
mMasterLedger.pushLedger(firstLedger);
Ledger::pointer secondLedger=firstLedger->closeLedger(time(NULL));
mMasterLedger.pushLedger(secondLedger);
mMasterLedger.setSynced();
}