Notify users about auto-senescence via -alertnotify

Closes #2829.
This commit is contained in:
Jack Grigg
2018-01-23 00:29:08 +00:00
parent 01c31ec57f
commit 7b4d0c7762
3 changed files with 55 additions and 6 deletions

View File

@@ -4,6 +4,7 @@
#include "deprecation.h"
#include "alert.h"
#include "clientversion.h"
#include "init.h"
#include "ui_interface.h"
@@ -12,7 +13,7 @@
static const std::string CLIENT_VERSION_STR = FormatVersion(CLIENT_VERSION);
void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
void EnforceNodeDeprecation(int nHeight, bool forceLogging, bool fThread) {
// Do not enforce deprecation in regtest or on testnet
std::string networkID = Params().NetworkIDString();
@@ -36,6 +37,7 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
"-disabledeprecation=", CLIENT_VERSION_STR);
}
LogPrintf("*** %s\n", msg);
CAlert::Notify(msg, fThread);
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_ERROR);
}
if (!disableDeprecation) {
@@ -56,6 +58,7 @@ void EnforceNodeDeprecation(int nHeight, bool forceLogging) {
"-disabledeprecation=", CLIENT_VERSION_STR);
}
LogPrintf("*** %s\n", msg);
CAlert::Notify(msg, fThread);
uiInterface.ThreadSafeMessageBox(msg, "", CClientUIInterface::MSG_WARNING);
}
}
}