mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Load theConfig before initializing Application.
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include "RPCDoor.h"
|
#include "RPCDoor.h"
|
||||||
#include "BitcoinUtil.h"
|
#include "BitcoinUtil.h"
|
||||||
#include "key.h"
|
#include "key.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
Application* theApp=NULL;
|
Application* theApp=NULL;
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ Application::Application() :
|
|||||||
mTxnDB(NULL), mLedgerDB(NULL), mWalletDB(NULL), mHashNodeDB(NULL), mNetNodeDB(NULL),
|
mTxnDB(NULL), mLedgerDB(NULL), mWalletDB(NULL), mHashNodeDB(NULL), mNetNodeDB(NULL),
|
||||||
mPeerDoor(NULL), mRPCDoor(NULL)
|
mPeerDoor(NULL), mRPCDoor(NULL)
|
||||||
{
|
{
|
||||||
theConfig.load();
|
nothing();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const char *TxnDBInit[], *LedgerDBInit[], *WalletDBInit[], *HashNodeDBInit[], *NetNodeDBInit[];
|
extern const char *TxnDBInit[], *LedgerDBInit[], *WalletDBInit[], *HashNodeDBInit[], *NetNodeDBInit[];
|
||||||
|
|||||||
@@ -47,14 +47,17 @@ void printHelp()
|
|||||||
int parseCommandline(int argc, char* argv[])
|
int parseCommandline(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|
||||||
|
theConfig.load();
|
||||||
|
|
||||||
if(argc>1)
|
if(argc>1)
|
||||||
{
|
{
|
||||||
theConfig.load();
|
|
||||||
ret=commandLineRPC(argc, argv);
|
ret=commandLineRPC(argc, argv);
|
||||||
if(ret)
|
if(ret)
|
||||||
printHelp();
|
printHelp();
|
||||||
}
|
}
|
||||||
else startApp();
|
else startApp();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user