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
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
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) + " " +
_("You should upgrade to the latest version of Zcash.");
if (!disableDeprecation) {
msg += " " + strprintf(_("To disable deprecation for this version, set %s%s."),
"-disabledeprecation=", CLIENT_VERSION_STR);
msg += " " + strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
"disabledeprecation", CLIENT_VERSION_STR);
}
LogPrintf("*** %s\n", msg);
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."),
DEPRECATION_HEIGHT) + " " +
_("You should upgrade to the latest version of Zcash.") + " " +
strprintf(_("To disable deprecation for this version, set %s%s."),
"-disabledeprecation=", CLIENT_VERSION_STR);
strprintf(_("To disable deprecation for this version, set '%s' to '%s'."),
"disabledeprecation", CLIENT_VERSION_STR);
}
LogPrintf("*** %s\n", msg);
CAlert::Notify(msg, fThread);

View File

@ -150,7 +150,7 @@ TEST_F(DeprecationTest, AlertNotify) {
// -alertnotify restricts the message to safe characters.
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,
CLIENT_VERSION_STR);