diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-06-12 12:00:39 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-06-15 09:58:05 +0200 |
| commit | 4d9c7fe61dd0e3e9443fd16c8ebbb3b119f7cff6 (patch) | |
| tree | afea50c5b36a47da2e5d89b19540b8a8f3bbea12 /src/init.cpp | |
| parent | gitian: Use the new bitcoin-detached-sigs git repo for OSX signatures (diff) | |
| download | discoin-4d9c7fe61dd0e3e9443fd16c8ebbb3b119f7cff6.tar.xz discoin-4d9c7fe61dd0e3e9443fd16c8ebbb3b119f7cff6.zip | |
Add option `-alerts` to opt out of alert system
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.
This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.
I intend to add this to the GUI options in another pull after this.
Github-Pull: #6274
Rebased-From: 02a6702a82a5b00e0e0351041dd3267308b7f319
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index d0eb5d312..eeb3358a1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -267,6 +267,7 @@ std::string HelpMessage(HelpMessageMode mode) string strUsage = HelpMessageGroup(_("Options:")); strUsage += HelpMessageOpt("-?", _("This help message")); + strUsage += HelpMessageOpt("-alerts", strprintf(_("Receive and display P2P network alerts (default: %u)"), DEFAULT_ALERTS)); strUsage += HelpMessageOpt("-alertnotify=<cmd>", _("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=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)")); strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288)); @@ -870,6 +871,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", true); nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes); + fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS); + // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log // Initialize elliptic curve code |