From 41c868f47e671dc5009cd47496c39c13ae36306b Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Sun, 22 Apr 2018 17:19:03 +0100 Subject: Re-introduce alert functionality (#1470) Re-introduce alert functionality removed from Bitcoin upstream --- src/init.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 31f3576b6..023f78bc2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -325,6 +325,7 @@ std::string HelpMessage(HelpMessageMode mode) std::string strUsage = HelpMessageGroup(_("Options:")); strUsage += HelpMessageOpt("-?", _("Print this help message and exit")); strUsage += HelpMessageOpt("-version", _("Print version and exit")); + strUsage += HelpMessageOpt("-alerts", strprintf(_("Receive and display P2P network alerts (default: %u)"), DEFAULT_ALERTS)); strUsage += HelpMessageOpt("-alertnotify=", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)")); strUsage += HelpMessageOpt("-blocknotify=", _("Execute command when the best block changes (%s in cmd is replaced by block hash, %i is replaced by block number)")); if (showDebug) @@ -1051,6 +1052,8 @@ bool AppInitParameterInteraction() fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER); nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes); + fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS); + // Option to startup with mocktime set (used for regression testing): SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op -- cgit v1.2.3