diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-12 12:00:39 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-15 09:53:33 +0200 |
commit | 02a6702a82a5b00e0e0351041dd3267308b7f319 (patch) | |
tree | e7e41447c2b7684c76ccada1242530a6b7556f64 /src/main.cpp | |
parent | ebab5d3c59558000f0e0fd18b7f26ed6f31ac21a (diff) | |
download | bitcoin-02a6702a82a5b00e0e0351041dd3267308b7f319.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.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 69c972a79f..49263a13fc 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); @@ -4622,7 +4623,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } - else if (strCommand == "alert") + else if (fAlerts && strCommand == "alert") { CAlert alert; vRecv >> alert; |