@@ -20,7 +20,6 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) {
|
||||
if (networkID != "main") return;
|
||||
|
||||
int blocksToDeprecation = DEPRECATION_HEIGHT - nHeight;
|
||||
bool disableDeprecation = (GetArg("-disabledeprecation", "") == CLIENT_VERSION_STR);
|
||||
if (blocksToDeprecation <= 0) {
|
||||
// In order to ensure we only log once per process when deprecation is
|
||||
// disabled (to avoid log spam), we only need to log in two cases:
|
||||
@@ -32,31 +31,16 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) {
|
||||
auto msg = strprintf(_("This version has been deprecated as of block height %d."),
|
||||
DEPRECATION_HEIGHT) + " " +
|
||||
_("You should upgrade to the latest version of Zcash.");
|
||||
if (!disableDeprecation) {
|
||||
msg += " " + strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
|
||||
"disabledeprecation", CLIENT_VERSION_STR);
|
||||
}
|
||||
LogPrintf("*** %s\n", msg);
|
||||
CAlert::Notify(msg, fThread);
|
||||
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR);
|
||||
}
|
||||
if (!disableDeprecation) {
|
||||
StartShutdown();
|
||||
}
|
||||
StartShutdown();
|
||||
} else if (blocksToDeprecation == DEPRECATION_WARN_LIMIT ||
|
||||
(blocksToDeprecation < DEPRECATION_WARN_LIMIT && forceLogging)) {
|
||||
std::string msg;
|
||||
if (disableDeprecation) {
|
||||
msg = strprintf(_("This version will be deprecated at block height %d."),
|
||||
std::string msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."),
|
||||
DEPRECATION_HEIGHT) + " " +
|
||||
_("You should upgrade to the latest version of Zcash.");
|
||||
} else {
|
||||
msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."),
|
||||
DEPRECATION_HEIGHT) + " " +
|
||||
_("You should upgrade to the latest version of Zcash.") + " " +
|
||||
strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
|
||||
"disabledeprecation", CLIENT_VERSION_STR);
|
||||
}
|
||||
LogPrintf("*** %s\n", msg);
|
||||
CAlert::Notify(msg, fThread);
|
||||
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING);
|
||||
|
||||
Reference in New Issue
Block a user