|
|
@ -935,8 +935,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
|
|
|
|
|
|
|
|
RegisterAllCoreRPCCommands(tableRPC); |
|
|
|
RegisterAllCoreRPCCommands(tableRPC); |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
bool fDisableWallet = GetBoolArg("-disablewallet", false); |
|
|
|
|
|
|
|
if (!fDisableWallet) |
|
|
|
|
|
|
|
RegisterWalletRPCCommands(tableRPC); |
|
|
|
RegisterWalletRPCCommands(tableRPC); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -965,9 +963,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
nBytesPerSigOp = GetArg("-bytespersigop", nBytesPerSigOp); |
|
|
|
nBytesPerSigOp = GetArg("-bytespersigop", nBytesPerSigOp); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
if (!fDisableWallet && !CWallet::ParameterInteraction()) |
|
|
|
if (!CWallet::ParameterInteraction()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG); |
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG); |
|
|
|
fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER); |
|
|
|
fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER); |
|
|
@ -1095,11 +1093,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 5: verify wallet database integrity
|
|
|
|
// ********************************************************* Step 5: verify wallet database integrity
|
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
if (!fDisableWallet) { |
|
|
|
|
|
|
|
if (!CWallet::Verify()) |
|
|
|
if (!CWallet::Verify()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} // (!fDisableWallet)
|
|
|
|
#endif |
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
|
|
|
|
// ********************************************************* Step 6: network initialization
|
|
|
|
// ********************************************************* Step 6: network initialization
|
|
|
|
|
|
|
|
|
|
|
|
assert(!g_connman); |
|
|
|
assert(!g_connman); |
|
|
@ -1427,17 +1423,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 8: load wallet
|
|
|
|
// ********************************************************* Step 8: load wallet
|
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
if (fDisableWallet) { |
|
|
|
if (!CWallet::InitLoadWallet()) |
|
|
|
pwalletMain = NULL; |
|
|
|
|
|
|
|
LogPrintf("Wallet disabled!\n"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
CWallet::InitLoadWallet(); |
|
|
|
|
|
|
|
if (!pwalletMain) |
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
#else |
|
|
|
#else // ENABLE_WALLET
|
|
|
|
|
|
|
|
LogPrintf("No wallet support compiled in!\n"); |
|
|
|
LogPrintf("No wallet support compiled in!\n"); |
|
|
|
#endif // !ENABLE_WALLET
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 9: data directory maintenance
|
|
|
|
// ********************************************************* Step 9: data directory maintenance
|
|
|
|
|
|
|
|
|
|
|
|