mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +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");
|
fPrintToConsole = GetBoolArg("-printtoconsole");
|
||||||
fPrintToDebugger = GetBoolArg("-printtodebugger");
|
fPrintToDebugger = GetBoolArg("-printtodebugger");
|
||||||
fLogTimestamps = GetBoolArg("-logtimestamps", true);
|
fLogTimestamps = GetBoolArg("-logtimestamps", true);
|
||||||
|
bool fDisableWallet = GetBoolArg("-disablewallet", false);
|
||||||
|
|
||||||
if (mapArgs.count("-timeout"))
|
if (mapArgs.count("-timeout"))
|
||||||
{
|
{
|
||||||
@ -699,7 +700,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
|
|
||||||
// ********************************************************* Step 5: verify wallet database integrity
|
// ********************************************************* Step 5: verify wallet database integrity
|
||||||
|
|
||||||
if (1) {
|
if (!fDisableWallet) {
|
||||||
uiInterface.InitMessage(_("Verifying wallet..."));
|
uiInterface.InitMessage(_("Verifying wallet..."));
|
||||||
|
|
||||||
if (!bitdb.Open(GetDataDir()))
|
if (!bitdb.Open(GetDataDir()))
|
||||||
@ -743,7 +744,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
if (r == CDBEnv::RECOVER_FAIL)
|
if (r == CDBEnv::RECOVER_FAIL)
|
||||||
return InitError(_("wallet.dat corrupt, salvage failed"));
|
return InitError(_("wallet.dat corrupt, salvage failed"));
|
||||||
}
|
}
|
||||||
} // (1)
|
} // (!fDisableWallet)
|
||||||
|
|
||||||
// ********************************************************* Step 6: network initialization
|
// ********************************************************* Step 6: network initialization
|
||||||
|
|
||||||
@ -1007,7 +1008,10 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
|
|
||||||
// ********************************************************* Step 8: load wallet
|
// ********************************************************* Step 8: load wallet
|
||||||
|
|
||||||
if (1) {
|
if (fDisableWallet) {
|
||||||
|
printf("Wallet disabled!\n");
|
||||||
|
pwalletMain = NULL;
|
||||||
|
} else {
|
||||||
uiInterface.InitMessage(_("Loading wallet..."));
|
uiInterface.InitMessage(_("Loading wallet..."));
|
||||||
|
|
||||||
nStart = GetTimeMillis();
|
nStart = GetTimeMillis();
|
||||||
@ -1094,7 +1098,7 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
|
pwalletMain->SetBestChain(CBlockLocator(pindexBest));
|
||||||
nWalletDBUpdated++;
|
nWalletDBUpdated++;
|
||||||
}
|
}
|
||||||
} // (1)
|
} // (!fDisableWallet)
|
||||||
|
|
||||||
// ********************************************************* Step 9: import blocks
|
// ********************************************************* Step 9: import blocks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user