Adjust deprecation message to work in both UI and -alertnotify

This commit is contained in:
Jack Grigg
2018-04-03 12:17:30 +01:00
parent 7b4d0c7762
commit 6c44424322
2 changed files with 5 additions and 5 deletions

View File

@@ -33,8 +33,8 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) {
DEPRECATION_HEIGHT) + " " + DEPRECATION_HEIGHT) + " " +
_("You should upgrade to the latest version of Zcash."); _("You should upgrade to the latest version of Zcash.");
if (!disableDeprecation) { if (!disableDeprecation) {
msg += " " + strprintf(_("To disable deprecation for this version, set %s%s."), msg += " " + strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
"-disabledeprecation=", CLIENT_VERSION_STR); "disabledeprecation", CLIENT_VERSION_STR);
} }
LogPrintf("*** %s\n", msg); LogPrintf("*** %s\n", msg);
CAlert::Notify(msg, fThread); CAlert::Notify(msg, fThread);
@@ -54,8 +54,8 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) {
msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."), msg = strprintf(_("This version will be deprecated at block height %d, and will automatically shut down."),
DEPRECATION_HEIGHT) + " " + DEPRECATION_HEIGHT) + " " +
_("You should upgrade to the latest version of Zcash.") + " " + _("You should upgrade to the latest version of Zcash.") + " " +
strprintf(_("To disable deprecation for this version, set %s%s."), strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
"-disabledeprecation=", CLIENT_VERSION_STR); "disabledeprecation", CLIENT_VERSION_STR);
} }
LogPrintf("*** %s\n", msg); LogPrintf("*** %s\n", msg);
CAlert::Notify(msg, fThread); CAlert::Notify(msg, fThread);

View File

@@ -150,7 +150,7 @@ TEST_F(DeprecationTest, AlertNotify) {
// -alertnotify restricts the message to safe characters. // -alertnotify restricts the message to safe characters.
auto expectedMsg = strprintf( auto expectedMsg = strprintf(
"This version will be deprecated at block height %d, and will automatically shut down. You should upgrade to the latest version of Zcash. To disable deprecation for this version, set disabledeprecation%s.", "This version will be deprecated at block height %d, and will automatically shut down. You should upgrade to the latest version of Zcash. To disable deprecation for this version, set disabledeprecation to %s.",
DEPRECATION_HEIGHT, DEPRECATION_HEIGHT,
CLIENT_VERSION_STR); CLIENT_VERSION_STR);