mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
Add -disablewallet option, to disable wallet support (and BDB)
Conflicts: src/init.cpp Rebased-from: 5d4f3a1f0cbdf52257b41ea09d175c0018ad9434
This commit is contained in:
parent
ebabf7571f
commit
4e111e0a8f
12
src/init.cpp
12
src/init.cpp
@ -611,6 +611,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
fPrintToConsole = GetBoolArg("-printtoconsole");
|
||||
fPrintToDebugger = GetBoolArg("-printtodebugger");
|
||||
fLogTimestamps = GetBoolArg("-logtimestamps", true);
|
||||
bool fDisableWallet = GetBoolArg("-disablewallet", false);
|
||||
|
||||
if (mapArgs.count("-timeout"))
|
||||
{
|
||||
@ -699,7 +700,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
|
||||
// ********************************************************* Step 5: verify wallet database integrity
|
||||
|
||||
if (1) {
|
||||
if (!fDisableWallet) {
|
||||
uiInterface.InitMessage(_("Verifying wallet..."));
|
||||
|
||||
if (!bitdb.Open(GetDataDir()))
|
||||
@ -743,7 +744,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
if (r == CDBEnv::RECOVER_FAIL)
|
||||
return InitError(_("wallet.dat corrupt, salvage failed"));
|
||||
}
|
||||
} // (1)
|
||||
} // (!fDisableWallet)
|
||||
|
||||
// ********************************************************* Step 6: network initialization
|
||||
|
||||
@ -1007,7 +1008,10 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
|
||||
// ********************************************************* Step 8: load wallet
|
||||
|
||||
if (1) {
|
||||
if (fDisableWallet) {
|
||||
printf("Wallet disabled!\n");
|
||||
pwalletMain = NULL;
|
||||
} else {
|
||||
uiInterface.InitMessage(_("Loading wallet..."));
|
||||
|
||||
nStart = GetTimeMillis();
|
||||
@ -1094,7 +1098,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
|
||||
nWalletDBUpdated++;
|
||||
}
|
||||
} // (1)
|
||||
} // (!fDisableWallet)
|
||||
|
||||
// ********************************************************* Step 9: import blocks
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user