Adjust deprecation message to work in both UI and -alertnotify
This commit is contained in:
parent
7b4d0c7762
commit
6c44424322
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue