aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-06-12 12:00:39 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-06-15 09:58:05 +0200
commit4d9c7fe61dd0e3e9443fd16c8ebbb3b119f7cff6 (patch)
treeafea50c5b36a47da2e5d89b19540b8a8f3bbea12 /src/main.cpp
parent95aca44095fc8fca0299ff44fb6316e16c6b7c16 (diff)
downloadbitcoin-4d9c7fe61dd0e3e9443fd16c8ebbb3b119f7cff6.tar.xz
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/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 05e5ca4234..ae9e57557f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -61,6 +61,7 @@ bool fCheckBlockIndex = false;
bool fCheckpointsEnabled = true;
size_t nCoinCacheUsage = 5000 * 300;
uint64_t nPruneTarget = 0;
+bool fAlerts = DEFAULT_ALERTS;
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
CFeeRate minRelayTxFee = CFeeRate(1000);
@@ -4605,7 +4606,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
- else if (strCommand == "alert")
+ else if (fAlerts && strCommand == "alert")
{
CAlert alert;
vRecv >> alert;