|
|
@ -1468,8 +1468,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
#endif // !ENABLE_WALLET
|
|
|
|
|
|
|
|
#ifdef ENABLE_MINING |
|
|
|
#ifndef ENABLE_WALLET |
|
|
|
auto mineToLocalWallet = GetBoolArg("-minetolocalwallet", false); |
|
|
|
if (mineToLocalWallet) { |
|
|
|
return InitError(_("Zcash was not built with wallet support. Set -minetolocalwallet=0 to use -mineraddress, or rebuild Zcash with wallet support.")); |
|
|
|
} |
|
|
|
if (!mapArgs.count("-mineraddress")) { |
|
|
|
return InitError(_("Zcash was not built with wallet support. Set -mineraddress, or rebuild Zcash with wallet support.")); |
|
|
|
} |
|
|
|
#endif // !ENABLE_WALLET
|
|
|
|
|
|
|
|
if (mapArgs.count("-mineraddress")) { |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
auto mineToLocalWallet = GetBoolArg("-minetolocalwallet", true); |
|
|
|
bool minerAddressInLocalWallet = false; |
|
|
|
if (pwalletMain) { |
|
|
@ -1482,12 +1492,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
if (mineToLocalWallet && !minerAddressInLocalWallet) { |
|
|
|
return InitError(_("-mineraddress is not in the local wallet. Either use a local address, or set -minetolocalwallet=0")); |
|
|
|
} |
|
|
|
#else // ENABLE_WALLET
|
|
|
|
auto mineToLocalWallet = GetBoolArg("-minetolocalwallet", false); |
|
|
|
if (mineToLocalWallet) { |
|
|
|
return InitError(_("Zcash was not built with wallet support. Set -minetolocalwallet=0 to use -mineraddress, or rebuild Zcash with wallet support.")); |
|
|
|
} |
|
|
|
#endif // !ENABLE_WALLET
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
} |
|
|
|
#endif // ENABLE_MINING
|
|
|
|
|
|
|
|