Change RPC unl_default to unl_load & unl_network and add UNL bootstrapping.

This commit is contained in:
Arthur Britto
2012-06-16 11:46:17 -07:00
parent 9964689f8f
commit f774baefeb
6 changed files with 169 additions and 95 deletions

View File

@@ -58,11 +58,11 @@ void Application::run()
//
// Construct databases.
//
mTxnDB = new DatabaseCon("transaction.db", TxnDBInit, TxnDBCount);
mLedgerDB = new DatabaseCon("ledger.db", LedgerDBInit, LedgerDBCount);
mWalletDB = new DatabaseCon("wallet.db", WalletDBInit, WalletDBCount);
mHashNodeDB = new DatabaseCon("hashnode.db", HashNodeDBInit, HashNodeDBCount);
mNetNodeDB = new DatabaseCon("netnode.db", NetNodeDBInit, NetNodeDBCount);
mTxnDB = new DatabaseCon("transaction.db", TxnDBInit, TxnDBCount);
mLedgerDB = new DatabaseCon("ledger.db", LedgerDBInit, LedgerDBCount);
mWalletDB = new DatabaseCon("wallet.db", WalletDBInit, WalletDBCount);
mHashNodeDB = new DatabaseCon("hashnode.db", HashNodeDBInit, HashNodeDBCount);
mNetNodeDB = new DatabaseCon("netnode.db", NetNodeDBInit, NetNodeDBCount);
//
// Begin validation and ip maintenance.
@@ -73,7 +73,7 @@ void Application::run()
//
// Allow peer connections.
//
if(!theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
if (!theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
{
mPeerDoor = new PeerDoor(mIOService);
}
@@ -85,7 +85,7 @@ void Application::run()
//
// Allow RPC connections.
//
if(!theConfig.RPC_IP.empty() && theConfig.RPC_PORT)
if (!theConfig.RPC_IP.empty() && theConfig.RPC_PORT)
{
mRPCDoor = new RPCDoor(mIOService);
}
@@ -122,7 +122,8 @@ void Application::run()
mNetOps.setStateTimer(0);
// temporary
getUNL().nodeBootstrap();
mIOService.run(); // This blocks
std::cout << "Done." << std::endl;