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 "BitcoinUtil.h"
|
||||
#include "key.h"
|
||||
#include "utils.h"
|
||||
|
||||
Application* theApp=NULL;
|
||||
|
||||
@@ -45,7 +46,7 @@ Application::Application() :
|
||||
mTxnDB(NULL), mLedgerDB(NULL), mWalletDB(NULL), mHashNodeDB(NULL), mNetNodeDB(NULL),
|
||||
mPeerDoor(NULL), mRPCDoor(NULL)
|
||||
{
|
||||
theConfig.load();
|
||||
nothing();
|
||||
}
|
||||
|
||||
extern const char *TxnDBInit[], *LedgerDBInit[], *WalletDBInit[], *HashNodeDBInit[], *NetNodeDBInit[];
|
||||
|
||||
@@ -47,14 +47,17 @@ void printHelp()
|
||||
int parseCommandline(int argc, char* argv[])
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
theConfig.load();
|
||||
|
||||
if(argc>1)
|
||||
{
|
||||
theConfig.load();
|
||||
ret=commandLineRPC(argc, argv);
|
||||
if(ret)
|
||||
printHelp();
|
||||
}
|
||||
else startApp();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user